Show / Hide Table of Contents

    Class DeserializedHttpResponse<T>

    Handles a deserialized HTTP response.

    Inheritance
    System.Object
    DeserializedHttpResponse<T>
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: DocuWare.Services.Http
    Assembly: DocuWare.RestClient.dll
    Syntax
    public class DeserializedHttpResponse<T> : IDisposable
    Type Parameters
    Name Description
    T

    The type of the encapsulated response.

    Remarks

    This class encapsulates a HTTP response. It contains the response headers and the deserialized body. Note that different values of T causes different handling:

    All exceptions thrown while the response is deserialized, are wrapped into an HttpClientRequestException object.

    Properties

    Content

    Gets the deserialized content of the response body.

    Declaration
    public T Content { get; }
    Property Value
    Type Description
    T

    The deserialized content of the response body.

    Exceptions
    Type Condition
    HttpClientRequestException

    ContentHeaders

    Gets the content headers.

    Declaration
    public HttpContentHeaders ContentHeaders { get; }
    Property Value
    Type Description
    System.Net.Http.Headers.HttpContentHeaders

    The content headers.

    Exception

    Gets the exception in case the request failed.

    Declaration
    public Exception Exception { get; }
    Property Value
    Type Description
    System.Exception

    The exception.

    Headers

    Gets the response headers.

    Declaration
    public HttpResponseHeaders Headers { get; }
    Property Value
    Type Description
    System.Net.Http.Headers.HttpResponseHeaders

    The response headers.

    IsSuccessStatusCode

    Gets a value indicating whether the response was successful.

    Declaration
    public bool IsSuccessStatusCode { get; }
    Property Value
    Type Description
    System.Boolean

    true if the response was successful; otherwise, false.

    RequestUri

    Gets the request URI.

    Declaration
    public Uri RequestUri { get; }
    Property Value
    Type Description
    System.Uri

    The request URI.

    StatusCode

    Gets the response status code.

    Declaration
    public HttpStatusCode StatusCode { get; }
    Property Value
    Type Description
    System.Net.HttpStatusCode

    The response status code.

    Methods

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()

    Finalize()

    Finalizes an instance of the DeserializedHttpResponse<T> class.

    Declaration
    protected void Finalize()

    Operators

    Implicit(DeserializedHttpResponse<T> to T)

    Converts the specified response.

    Declaration
    public static implicit operator T(DeserializedHttpResponse<T> response)
    Parameters
    Type Name Description
    DeserializedHttpResponse<T> response

    The response.

    Returns
    Type Description
    T

    The content of the response.

    Implements

    System.IDisposable
    About Us Contact Imprint Terms Data privacy
    © 2024 DocuWare Corporation powered by DocFX Back to top