Class ApiResponse<T>
API Response
Implements
Inherited Members
Namespace: mailslurp.Client
Assembly: mailslurp.dll
Syntax
public class ApiResponse<T> : IApiResponse
Type Parameters
Name | Description |
---|---|
T |
Constructors
View SourceApiResponse(HttpStatusCode, T, string)
Initializes a new instance of the ApiResponse<T> class.
Declaration
public ApiResponse(HttpStatusCode statusCode, T data, string rawContent)
Parameters
Type | Name | Description |
---|---|---|
HttpStatusCode | statusCode | HTTP status code. |
T | data | Data (parsed HTTP body) |
string | rawContent | Raw content. |
ApiResponse(HttpStatusCode, T)
Initializes a new instance of the ApiResponse<T> class.
Declaration
public ApiResponse(HttpStatusCode statusCode, T data)
Parameters
Type | Name | Description |
---|---|---|
HttpStatusCode | statusCode | HTTP status code. |
T | data | Data (parsed HTTP body) |
ApiResponse(HttpStatusCode, Multimap<string, string>, T, string)
Initializes a new instance of the ApiResponse<T> class.
Declaration
public ApiResponse(HttpStatusCode statusCode, Multimap<string, string> headers, T data, string rawContent)
Parameters
Type | Name | Description |
---|---|---|
HttpStatusCode | statusCode | HTTP status code. |
Multimap<string, string> | headers | HTTP headers. |
T | data | Data (parsed HTTP body) |
string | rawContent | Raw content. |
ApiResponse(HttpStatusCode, Multimap<string, string>, T)
Initializes a new instance of the ApiResponse<T> class.
Declaration
public ApiResponse(HttpStatusCode statusCode, Multimap<string, string> headers, T data)
Parameters
Type | Name | Description |
---|---|---|
HttpStatusCode | statusCode | HTTP status code. |
Multimap<string, string> | headers | HTTP headers. |
T | data | Data (parsed HTTP body) |
Properties
View SourceContent
The data type of Content
Declaration
public object Content { get; }
Property Value
Type | Description |
---|---|
object |
Cookies
Gets or sets any cookies passed along on the response.
Declaration
public List<Cookie> Cookies { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><Cookie> |
Data
Gets or sets the data (parsed HTTP body)
Declaration
public T Data { get; }
Property Value
Type | Description |
---|---|
T | The data. |
ErrorText
Gets or sets any error text defined by the calling client.
Declaration
public string ErrorText { get; set; }
Property Value
Type | Description |
---|---|
string |
Headers
Gets or sets the HTTP headers
Declaration
public Multimap<string, string> Headers { get; }
Property Value
Type | Description |
---|---|
Multimap<string, string> | HTTP headers |
RawContent
The raw content
Declaration
public string RawContent { get; }
Property Value
Type | Description |
---|---|
string |
ResponseType
The content of this response
Declaration
public Type ResponseType { get; }
Property Value
Type | Description |
---|---|
Type |
StatusCode
Gets or sets the status code (HTTP status code)
Declaration
public HttpStatusCode StatusCode { get; }
Property Value
Type | Description |
---|---|
HttpStatusCode | The status code. |