Interface IHttpResponseMessage
Interface for an HttpResponseMessage.
Inherited Members
Namespace: Tableau.Migration.Net
Assembly: Tableau.Migration.dll
Syntax
public interface IHttpResponseMessage : IDisposable
Properties
Content
Gets the content of the HTTP response message.
Declaration
HttpContent Content { get; }
Property Value
Type | Description |
---|---|
HttpContent |
Headers
Gets the collection of HTTP response headers.
Declaration
HttpHeaders Headers { get; }
Property Value
Type | Description |
---|---|
HttpHeaders |
IsSuccessStatusCode
Gets a value that indicates if the HTTP response was successful.
Declaration
bool IsSuccessStatusCode { get; }
Property Value
Type | Description |
---|---|
bool |
ReasonPhrase
Gets the reason phrase which typically is sent by servers together with the status code.
Declaration
string? ReasonPhrase { get; }
Property Value
Type | Description |
---|---|
string |
RequestMessage
Gets the request message which led to this response message.
Declaration
HttpRequestMessage? RequestMessage { get; }
Property Value
Type | Description |
---|---|
HttpRequestMessage |
StatusCode
Gets the status code of the HTTP response.
Declaration
HttpStatusCode StatusCode { get; }
Property Value
Type | Description |
---|---|
HttpStatusCode |
TrailingHeaders
Gets the collection of trailing headers included in an HTTP response.
Declaration
HttpHeaders TrailingHeaders { get; }
Property Value
Type | Description |
---|---|
HttpHeaders |
Version
Gets the HTTP message version.
Declaration
Version Version { get; }
Property Value
Type | Description |
---|---|
Version |
Methods
EnsureSuccessStatusCode()
Throws an exception if the IsSuccessStatusCode property for the HTTP response is false
Declaration
IHttpResponseMessage EnsureSuccessStatusCode()
Returns
Type | Description |
---|---|
IHttpResponseMessage | The HTTP response message if the call is successful. |