Table of Contents

Class DeserializedHttpResponse<T>

Namespace
DocuWare.Services.Http
Assembly
DocuWare.RestClient.dll

Handles a deserialized HTTP response.

public class DeserializedHttpResponse<T> : IDisposable

Type Parameters

NameDescription
T

The type of the encapsulated response.

Inheritance
DeserializedHttpResponse<T>
Implements
Inherited Members

Remarks

This class encapsulates a HTTP response. It contains the response headers and the deserialized body. Note that different values of T causes different handling:

All exceptions thrown while the response is deserialized, are wrapped into an HttpClientRequestException object.

Properties

Content

Gets the deserialized content of the response body.

public T Content { get; }

Property Value

TypeDescription
T

The deserialized content of the response body.

Exceptions

TypeCondition
HttpClientRequestException

ContentHeaders

Gets the content headers.

public HttpContentHeaders ContentHeaders { get; }

Property Value

TypeDescription
HttpContentHeaders

The content headers.

Exception

Gets the exception in case the request failed.

public Exception Exception { get; }

Property Value

TypeDescription
Exception

The exception.

Headers

Gets the response headers.

public HttpResponseHeaders Headers { get; }

Property Value

TypeDescription
HttpResponseHeaders

The response headers.

IsSuccessStatusCode

Gets a value indicating whether the response was successful.

public bool IsSuccessStatusCode { get; }

Property Value

TypeDescription
Boolean

true if the response was successful; otherwise, false.

RequestUri

Gets the request URI.

public Uri RequestUri { get; }

Property Value

TypeDescription
Uri

The request URI.

StatusCode

Gets the response status code.

public HttpStatusCode StatusCode { get; }

Property Value

TypeDescription
HttpStatusCode

The response status code.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Finalize()

Finalizes an instance of the DeserializedHttpResponse<T> class.

protected void Finalize()

Operators

Implicit(DeserializedHttpResponse<T> to T)

Converts the specified response.

public static implicit operator T(DeserializedHttpResponse<T> response)

Parameters

TypeNameDescription
DeserializedHttpResponse<T>response

The response.

Returns

TypeDescription
T

The content of the response.