vibe.d beta banner
get vibe.d
0.10.1

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

Class HTTPClientRequest

Represents a HTTP client request (as sent to the server).

class HTTPClientRequest
  : HTTPRequest ;

Fields

NameTypeDescription
headers DictionaryList!(string,false,12L,false)All request headers
httpVersion HTTPVersionThe HTTP protocol version used for the request
method HTTPMethodThe HTTP method of the request
requestURI stringThe request URI
m_conn vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.Stream)

Properties

NameTypeDescription
bodyWriter[get] vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream)An output stream suitable for writing the request body.
contentLength[get, set] longAccesses the Content-Length header of the request.
localAddress[get] NetworkAddress
peerCertificate[get] inout(TLSCertificateInformation)
remoteAddress[get] NetworkAddress
contentType[get, set] stringReturns the mime type part of the 'Content-Type' header.
contentTypeParameters[get] stringReturns any supplementary parameters of the 'Content-Type' header.
host[get, set] stringShortcut to the 'Host' header (always present for HTTP 1.1)
persistent[get] boolDetermines if the connection persists across requests.

Methods

NameDescription
writeBody (data) Writes the whole request body at once using raw bytes.
writeFormBody (key_value_map) Writes the request body as form data.
writeJsonBody (data, allow_chunked) Writes the request body as JSON data.
writePart (part)
toString ()

Aliases

NameDescription
requestURL Compatibility alias - scheduled for deprecation
Authors

Sönke Ludwig, Jan Krüger

Copyright

© 2012-2014 Sönke Ludwig

License

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