Class DeserializedHttpResponse<T>
- Namespace
- DocuWare.Services.Http
- Assembly
- DocuWare.RestClient.dll
Handles a deserialized HTTP response.
public class DeserializedHttpResponse<T> : IDisposable
Type Parameters
| Name | Description |
|---|---|
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:
Properties
Content
Gets the deserialized content of the response body.
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.
public HttpContentHeaders ContentHeaders { get; }
Property Value
| Type | Description |
|---|---|
| HttpContentHeaders | The content headers. |
Exception
Gets the exception in case the request failed.
public Exception Exception { get; }
Property Value
| Type | Description |
|---|---|
| Exception | The exception. |
Headers
Gets the response headers.
public HttpResponseHeaders Headers { get; }
Property Value
| Type | Description |
|---|---|
| HttpResponseHeaders | The response headers. |
IsSuccessStatusCode
Gets a value indicating whether the response was successful.
public bool IsSuccessStatusCode { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
RequestUri
Gets the request URI.
public Uri RequestUri { get; }
Property Value
| Type | Description |
|---|---|
| Uri | The request URI. |
StatusCode
Gets the response status code.
public HttpStatusCode StatusCode { get; }
Property Value
| Type | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| DeserializedHttpResponse<T> | response | The response. |
Returns
| Type | Description |
|---|---|
| T | The content of the response. |