Interface IRestResponse<TData>
Represents a response from calling a REST API.
Namespace: Colore.Rest
Assembly: Colore.dll
Syntax
public interface IRestResponse<out TData>
Type Parameters
| Name | Description |
|---|---|
| TData | The type contained in this response. |
Properties
Content
Gets the body content as a String, or null if no content.
Declaration
string Content { get; }
Property Value
| Type | Description |
|---|---|
| String |
Data
Gets the data returned from the request.
Declaration
TData Data { get; }
Property Value
| Type | Description |
|---|---|
| TData |
IsSuccessful
Gets a value indicating whether the REST request was successful.
Declaration
bool IsSuccessful { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Status
Gets the HTTP status of the response.
Declaration
HttpStatusCode Status { get; }
Property Value
| Type | Description |
|---|---|
| HttpStatusCode |
Methods
Deserialize<T>()
Deserializes the response content into the specified type.
Declaration
T Deserialize<T>()
Returns
| Type | Description |
|---|---|
| T | An instance of |
Type Parameters
| Name | Description |
|---|---|
| T | The type to deserialize into. |