Click or drag to resize
DeserializedHttpResponseT Class
Handles a deserialized HTTP response.
Inheritance Hierarchy
SystemObject
  DocuWare.Services.HttpDeserializedHttpResponseT

Namespace: DocuWare.Services.Http
Assembly: DocuWare.RestClient (in DocuWare.RestClient.dll) Version: Version 6.7 [UNOFFICIAL BUILD]
Syntax
C#
public class DeserializedHttpResponse<T> : IDisposable

Type Parameters

T
The type of the encapsulated response.

The DeserializedHttpResponseT type exposes the following members.

Constructors
  NameDescription
Public methodDeserializedHttpResponseT
Initializes a new instance of the DeserializedHttpResponseT class.
Top
Methods
  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodFinalize
Finalizes an instance of the DeserializedHttpResponseT class.
(Overrides ObjectFinalize.)
Top
Operators
Properties
  NameDescription
Public propertyContent
Gets the deserialized content of the response body.
Public propertyContentHeaders
Gets the content headers.
Public propertyException
Gets the exception in case the request failed.
Public propertyHeaders
Gets the response headers.
Public propertyIsSuccessStatusCode
Gets a value indicating whether the response was successful.
Public propertyRequestUri
Gets the request URI.
Public propertyStatusCode
Gets the response status code.
Top
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:
  • A String will cause the HTTP response message content to be read as string.
  • A XElement will cause the HTTP response message content to be read as XElement. There might exceptions be thrown in case the response content is not a valid XML.
  • A Stream will cause the HTTP response message content to be read as Stream. The response content is read streaming, that is, you can consume arbitrary large streams. You should always call Close after you finished reading the stream in order to close the HTTP connection.
  • FOr any other values of T the response content is deserialized into an intance of type T. If the deserialization step fails, the XmlSerializer throws exceptions.
All exceptions thrown while the response is deserialized, are wrapped into an HttpClientRequestException object.
See Also