<PackageReference Include="Refit" Version="16.2.0" />

Refit.IApiResponse

public interface IApiResponse : IDisposable
Base interface used to represent an API response.

Gets the HTTP response content headers as defined in RFC 2616.

Gets the exception object in case of unsuccessful request or response.

Gets the HTTP response headers.

bool IsReceived { get; }

Gets a value indicating whether a response was received from the server.

bool IsSuccessful { get; }

Gets a value indicating whether the request was successful and there wasn't any other error (for example, during content deserialization).

bool IsSuccessStatusCode { get; }

Gets a value indicating whether the request was successful.

string ReasonPhrase { get; }

Gets the reason phrase which typically is sent by the server together with the status code.

Gets the HTTP Request message which led to this response.

Gets the HTTP response status code.

Version Version { get; }

Gets the HTTP Message version.

Checks if the call failed before a response was received from the server.

Checks if the call failed due to an unsuccessful response from the server.