vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Class HTTPClientResponse

Represents a HTTP client response (as received from the server).

class HTTPClientResponse
  : HTTPResponse ;

Fields

NameTypeDescription
headers DictionaryList!(string,false,12L,false)The response header fields
httpVersion HTTPVersionThe protocol version of the response - should not be changed
statusCode intThe status code of the response, 200 by default
statusPhrase stringThe status phrase of the response
m_cookies DictionaryList!(vibe.http.common.Cookie,true,32L,false)

Properties

NameTypeDescription
bodyReader[get] vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.InputStream)An input stream suitable for reading the response body.
cookies[get] DictionaryList!(vibe.http.common.Cookie,true,32L,false)All cookies that shall be set on the client for this request
maxRequests[get] intContains the keep-alive 'max' parameter, indicates how many requests a client can make before the server closes the connection.
contentType[get, set] stringShortcut to the "Content-Type" header

Methods

NameDescription
disconnect () Forcefully terminates the connection regardless of the current state.
dropBody () Reads and discards the response body.
readJson () Reads the whole response body and tries to parse it as JSON.
readRawBody (del) Provides unsafe means to read raw data from the connection.
switchProtocol (new_protocol) Switches the connection to a new protocol and returns the resulting ConnectionStream.
toString ()
Authors

Sönke Ludwig, Jan Krüger

Copyright

© 2012-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.