vibe.d beta banner
get vibe.d
0.7.30

Class HTTPClientResponse

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

class HTTPClientResponse
  : HTTPResponse;

Fields

Fields

NameTypeDescription
cookiesCookie[string]All cookies that shall be set on the client for this request
headersDictionaryList!(string,false,12L,false)The response header fields
httpVersionHTTPVersionThe protocol version of the response - should not be changed
statusCodeintThe status code of the response, 200 by default
statusPhrasestringThe status phrase of the response

Properties

Properties

NameTypeDescription
bodyReader[get]InputStreamAn input stream suitable for reading the response body.
maxRequests[get]intContains the keep-alive 'max' parameter, indicates how many requests a client can
contentType[get, set]stringShortcut to the "Content-Type" header

Methods

Methods

NameDescription
disconnectForcefully terminates the connection regardless of the current state.
dropBodyReads and discards the response body.
readJsonReads the whole response body and tries to parse it as JSON.
readRawBodyProvides unsafe means to read raw data from the connection.
switchProtocolSwitches 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.