Class DeserializedHttpResponseExtensions
- Namespace
- DocuWare.Services.Http
- Assembly
- DocuWare.RestClient.dll
public static class DeserializedHttpResponseExtensions
- Inheritance
-
DeserializedHttpResponseExtensions
- Inherited Members
Methods
GetFileName(DeserializedHttpResponse<Stream>)
Gets the file name of the HTTP response.
public static string GetFileName(this DeserializedHttpResponse<Stream> response)
Parameters
| Type | Name | Description |
|---|---|---|
| DeserializedHttpResponse<Stream> | response | The response. |
Returns
| Type | Description |
|---|---|
| String | The file name of the HTTP response. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Response does not contain file name header. |
| ArgumentNullException | If |
GetFileNameSafe(DeserializedHttpResponse<Stream>)
Gets the file name of the HTTP response.
public static string GetFileNameSafe(this DeserializedHttpResponse<Stream> response)
Parameters
| Type | Name | Description |
|---|---|---|
| DeserializedHttpResponse<Stream> | response | The response. |
Returns
| Type | Description |
|---|---|
| String | The file name of the HTTP response. If the response does not contain a file name, |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If |
ToContent<T>(Task<DeserializedHttpResponse<T>>)
Returns the content asynchronously.
public static Task<T> ToContent<T>(this Task<DeserializedHttpResponse<T>> response)
where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| Task<DeserializedHttpResponse<T>> | response |
Returns
| Type | Description |
|---|---|
| Task<T> |
Type Parameters
| Name | Description |
|---|---|
T |