Class DeserializedHttpResponse<T>
Handles a deserialized HTTP response.
Inheritance
Implements
Inherited Members
Namespace: DocuWare.Services.Http
Assembly: DocuWare.RestClient.dll
Syntax
public class DeserializedHttpResponse<T> : IDisposable
Type Parameters
Name | Description |
---|---|
T | The type of the encapsulated response. |
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:
Properties
Content
Gets the deserialized content of the response body.
Declaration
public T Content { get; }
Property Value
Type | Description |
---|---|
T | The deserialized content of the response body. |
Exceptions
Type | Condition |
---|---|
HttpClientRequestException |
ContentHeaders
Gets the content headers.
Declaration
public HttpContentHeaders ContentHeaders { get; }
Property Value
Type | Description |
---|---|
System.Net.Http.Headers.HttpContentHeaders | The content headers. |
Exception
Gets the exception in case the request failed.
Declaration
public Exception Exception { get; }
Property Value
Type | Description |
---|---|
System.Exception | The exception. |
Headers
Gets the response headers.
Declaration
public HttpResponseHeaders Headers { get; }
Property Value
Type | Description |
---|---|
System.Net.Http.Headers.HttpResponseHeaders | The response headers. |
IsSuccessStatusCode
Gets a value indicating whether the response was successful.
Declaration
public bool IsSuccessStatusCode { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
RequestUri
Gets the request URI.
Declaration
public Uri RequestUri { get; }
Property Value
Type | Description |
---|---|
System.Uri | The request URI. |
StatusCode
Gets the response status code.
Declaration
public HttpStatusCode StatusCode { get; }
Property Value
Type | Description |
---|---|
System.Net.HttpStatusCode | The response status code. |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Finalize()
Finalizes an instance of the DeserializedHttpResponse<T> class.
Declaration
protected void Finalize()
Operators
Implicit(DeserializedHttpResponse<T> to T)
Converts the specified response.
Declaration
public static implicit operator T(DeserializedHttpResponse<T> response)
Parameters
Type | Name | Description |
---|---|---|
DeserializedHttpResponse<T> | response | The response. |
Returns
Type | Description |
---|---|
T | The content of the response. |