vibe.d beta banner
get vibe.d

Class HTTPClientResponse

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

Inherits from


Name Type Description
cookies Cookie[string] All cookies that shall be set on the client for this request
headers DictionaryList!(string,false,12L,false) The response header fields
httpVersion HTTPVersion The protocol version of the response - should not be changed
statusCode int The status code of the response, 200 by default
statusPhrase string The status phrase of the response


Name Type Description
bodyReader [get] InputStream An input stream suitable for reading the response body.
maxRequests [get] int Contains the keep-alive 'max' parameter, indicates how many requests a client can
contentType [get, set] string Shortcut to the "Content-Type" header


Name Description
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 Provides unsafe means to read raw data from the connection.
switchProtocol Switches the connection to a new protocol and returns the resulting ConnectionStream.
block ddox.authorsblock ddox.copyrightblock ddox.license