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 SourceContentType
The Content-Type of the response Will be filled due to the annotation
Declaration
public string ContentType { get; set; }
Returns
Type | Description |
---|---|
System.String |
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 |
HasError
Was there an error?
Declaration
public bool HasError { get; }
Returns
Type | Description |
---|---|
System.Boolean |
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 |
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 |
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 |