Table of Contents

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

TypeNameDescription
DeserializedHttpResponse<Stream>response

The response.

Returns

TypeDescription
String

The file name of the HTTP response.

Exceptions

TypeCondition
ArgumentException

Response does not contain file name header.

ArgumentNullException

If response is null.

GetFileNameSafe(DeserializedHttpResponse<Stream>)

Gets the file name of the HTTP response.

public static string GetFileNameSafe(this DeserializedHttpResponse<Stream> response)

Parameters

TypeNameDescription
DeserializedHttpResponse<Stream>response

The response.

Returns

TypeDescription
String

The file name of the HTTP response. If the response does not contain a file name, null is returned.

Exceptions

TypeCondition
ArgumentNullException

If response is null.

ToContent<T>(Task<DeserializedHttpResponse<T>>)

Returns the content asynchronously.

public static Task<T> ToContent<T>(this Task<DeserializedHttpResponse<T>> response)
    where T : class

Parameters

TypeNameDescription
Task<DeserializedHttpResponse<T>>response

Returns

TypeDescription
Task<T>

Type Parameters

NameDescription
T