#include <HTTPRequestBuilder.h>
◆ HTTPRequestBuilder()
Constructs new instance.
- Parameters
-
urlEncoder | - |
client | - |
connectionTimeoutMs | - |
timeoutMs | - |
◆ authenticateWith()
Sets the request authenticator.
- Parameters
-
- Returns
- instance for fluent method chaining.
◆ body()
Sets body as string.
- Parameters
-
- Returns
- instance for fluent method chaining.
◆ build()
Builds the request.
- Returns
- the request.
◆ buildMessageBodyFromFormParameters()
std::string tenduke::http::HTTPRequestBuilder::buildMessageBodyFromFormParameters |
( |
| ) |
|
|
protected |
Builds the message body from form-parameters.
- Returns
- -
◆ call()
Builds the request, and builds the call in one call.
NOTE: if HTTP-client not present, you will get an exception.
Remember to execute the call.
- Returns
- call for the request
- Exceptions
-
◆ charset()
Sets character set.
- Parameters
-
- Returns
- instance for fluent method chaining.
◆ contentType()
Sets content-type.
- Parameters
-
- Returns
- instance for fluent method chaining.
◆ formParameter()
xdhttp::HTTPRequestBuilder & tenduke::http::HTTPRequestBuilder::formParameter |
( |
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
Adds form-parameter to the request.
The method will PCT-encode the parameter (name and value).
- Parameters
-
- Returns
- instance for fluent method chaining.
◆ get()
Sets the method to GET.
- Returns
- this instance for fluent method chaining.
◆ header()
xdhttp::HTTPRequestBuilder & tenduke::http::HTTPRequestBuilder::header |
( |
const std::string & |
name, |
|
|
const std::string & |
value, |
|
|
bool |
skipIfValueEmpty = true |
|
) |
| |
Adds header to the request.
- Parameters
-
name | name of the header |
value | value of the header |
skipIfValueEmpty | if true and value is empty, the header will not be added. |
- Returns
- instance for fluent method chaining.
◆ post()
Sets the method to POST.
- Returns
- instance for fluent method chaining.
◆ url() [1/2]
Starts URL-building.
- Returns
- -
◆ url() [2/2]
Sets the request URL.
- Parameters
-
- Returns
- instance for fluent method chaining.
◆ utf8()
Sets the character set to UTF-8.
(Syntactic sugar).
- Returns
- instance for fluent method chaining.
The documentation for this class was generated from the following files: