Improve this Doc View Source

Class HttpResponse<TResponse, TErrorResponse>

This container can be used to get the details of a response. It also makes it possible to process the error information, and eventually do something different. You can specify your own container, by using the HttpAttribute.

Inheritance
System.Object
HttpResponse<TResponse, TErrorResponse>
Namespace:Dapplo.HttpExtensions
Assembly:Dapplo.HttpExtensions.dll
Syntax
public class HttpResponse<TResponse, TErrorResponse> where TResponse : class where TErrorResponse : class

Properties

| Improve this Doc View Source

ContentType

The Content-Type of the response Will be filled due to the annotation

Declaration
public string ContentType { get; set; }
Returns
Type Description
System.String
| Improve this Doc View Source

ErrorResponse

The response if there was an error Will be filled due to the annotation

Declaration
public TErrorResponse ErrorResponse { get; set; }
Returns
Type Description
TErrorResponse
| Improve this Doc View Source

HasError

Was there an error?

Declaration
public bool HasError { get; }
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Headers

The reponse headers Will be filled due to the annotation

Declaration
public HttpResponseHeaders Headers { get; set; }
Returns
Type Description
System.Net.Http.Headers.HttpResponseHeaders
| Improve this Doc View Source

Response

The response, if there was no error Will be filled due to the annotation

Declaration
public TResponse Response { get; set; }
Returns
Type Description
TResponse
| Improve this Doc View Source

StatusCode

The response http status code Will be filled due to the annotation

Declaration
public HttpStatusCode StatusCode { get; set; }
Returns
Type Description
System.Net.HttpStatusCode