Request

* Structure Request provides configuration, connection pooling, cookie * persistance. You can consider it as 'Session'.

struct Request {}

Members

Classes

LastInterceptor
class LastInterceptor
Undocumented in source.

Functions

addHeaders
void addHeaders(string[string] headers)

Add headers to request

addInterceptor
void addInterceptor(Interceptor i)

Add interceptor to request.

clearHeaders
void clearHeaders()

Remove any previously added headers.

deleteRequest
Response deleteRequest(string uri, string[string] query)
Undocumented in source. Be warned that the author may not have intended to support it.
deleteRequest
Response deleteRequest(string uri, QueryParam[] params)
Undocumented in source. Be warned that the author may not have intended to support it.
exec
Response exec(string url, A args)

Execute GET for http and retrieve file for FTP. You have to provide at least uri. All other arguments should conform to HTTPRequest.get or FTPRequest.get depending on the URI scheme. When arguments do not conform scheme (for example you try to call get("ftp://somehost.net/pub/README", {"a":"b"}) which doesn't make sense) you will receive Exception("Operation not supported for ftp")

exec
Response exec(string url, string[string] query)
Undocumented in source. Be warned that the author may not have intended to support it.
execute
Response execute(string method, string url, R content, string ct)
Undocumented in source. Be warned that the author may not have intended to support it.
execute
Response execute(string method, string url, MultipartForm form)
Undocumented in source. Be warned that the author may not have intended to support it.
execute
Response execute(string method, string url, QueryParam[] params)
Undocumented in source. Be warned that the author may not have intended to support it.
format
string format(string fmt)
Undocumented in source. Be warned that the author may not have intended to support it.
get
Response get(string uri, string[string] query)
Undocumented in source. Be warned that the author may not have intended to support it.
get
Response get(string uri, QueryParam[] params)
Undocumented in source. Be warned that the author may not have intended to support it.
patch
Response patch(string uri, QueryParam[] query)
Undocumented in source. Be warned that the author may not have intended to support it.
patch
Response patch(string uri, MultipartForm form)
Undocumented in source. Be warned that the author may not have intended to support it.
patch
Response patch(string uri, R content, string contentType)
Undocumented in source. Be warned that the author may not have intended to support it.
post
Response post(string uri, string[string] query)
Undocumented in source. Be warned that the author may not have intended to support it.
post
Response post(string uri, QueryParam[] query)
Undocumented in source. Be warned that the author may not have intended to support it.
post
Response post(string uri, MultipartForm form)
Undocumented in source. Be warned that the author may not have intended to support it.
post
Response post(string uri, R content, string contentType)
Undocumented in source. Be warned that the author may not have intended to support it.
put
Response put(string uri, QueryParam[] query)
Undocumented in source. Be warned that the author may not have intended to support it.
put
Response put(string uri, MultipartForm form)
Undocumented in source. Be warned that the author may not have intended to support it.
put
Response put(string uri, R content, string contentType)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

cm
auto cm [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
hasMultipartForm
bool hasMultipartForm [@property getter]

helper

path
string path [@property setter]
string path [@property getter]

Set/Get path for next request.

sslSetCaCert
string sslSetCaCert [@property setter]

Set path to certificate authority file.

sslSetCertFile
void sslSetCertFile(string p, SSLOptions.filetype t)

Set path and format for ssl certificate file.

sslSetKeyFile
void sslSetKeyFile(string p, SSLOptions.filetype t)

Set path and format for ssl key file.

sslSetVerifyPeer
bool sslSetVerifyPeer [@property setter]

Enable/disable ssl peer verification..

uri
string uri [@property setter]

Set and Get uri for next request.

userHeaders
auto userHeaders [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta