requests.http

Undocumented in source.

Members

Classes

BasicAuthentication
class BasicAuthentication

Basic authentication. Adds Authorization: Basic header to request.

FormDataBytes
class FormDataBytes
Undocumented in source.
FormDataFile
class FormDataFile
Undocumented in source.
HTTPResponse
class HTTPResponse

Response - result of request execution.

MaxRedirectsException
class MaxRedirectsException
Undocumented in source.

Functions

formData
auto formData(string name, File f, string[string] parameters)

Helper to create form elements from File.

formData
auto formData(string name, ubyte[] b, string[string] parameters)

Helper to create form elements from ubyte[].

formData
auto formData(string name, string b, string[string] parameters)
Undocumented in source. Be warned that the author may not have intended to support it.
fromJsonArrayToStr
string fromJsonArrayToStr(JSONValue v)
Undocumented in source. Be warned that the author may not have intended to support it.
fromJsonArrayToStr
string fromJsonArrayToStr(JSONValue v)
Undocumented in source. Be warned that the author may not have intended to support it.
httpTestServer
string httpTestServer()
Undocumented in source. Be warned that the author may not have intended to support it.
httpTestServer
string httpTestServer()
Undocumented in source. Be warned that the author may not have intended to support it.
queryParams
auto queryParams(T params)

Interfaces

FiniteReadable
interface FiniteReadable

This is File-like interface for sending data to multipart fotms

Structs

HTTPRequest
struct HTTPRequest

Request. Configurable parameters: method - string, method to use (GET, POST, ...) headers - stringstring, add any additional headers you'd like to send. authenticator - class Auth, class to send auth headers. keepAlive - bool, set true for keepAlive requests. default true. maxRedirects - uint, maximum number of redirects. default 10. maxHeadersLength - size_t, maximum length of server response headers. default = 32KB. maxContentLength - size_t, maximun content length. delault - 0 = unlimited. bufferSize - size_t, send and receive buffer size. default = 16KB. verbosity - uint, level of verbosity(0 - nothing, 1 - headers, 2 - headers and body progress). default = 0. proxy - string, set proxy url if needed. default - null. cookie - Tuple Cookie, Read/Write cookie You can get cookie setted by server, or set cookies before doing request. timeout - Duration, Set timeout value for connect/receive/send.

MultipartForm
struct MultipartForm

This struct used to bulld POST's to forms. Each part have name and data. data is something that can be read-ed and have size. For example this can be string-like object (wrapped for reading) or opened File.

PostFile
struct PostFile

Struct to send multiple files in POST request.

Meta