10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::http::HTTPRequest Class Reference

#include <HTTPRequest.h>

Detailed Description

HTTP-request, which contains all necessary details to construct the request.

Public Member Functions

 HTTPRequest (std::string method, ::tenduke::net::URL url, const std::multimap< std::string, std::string > &headers=std::multimap< std::string, std::string >(), std::shared_ptr< const tenduke::http::HTTPRequestAuthenticator > requestAuthenticator=nullptr, std::string messageBody="", long connectionTimeoutMs=DEFAULT_CONNECTION_TIMEOUT_MS, long timeoutMs=DEFAULT_TIMEOUT_MS)
 Constructs new instance.
const std::string & getMessageBody () const
 Returns the message body.
const std::string & getMethod () const
 Returns the method.
const ::tenduke::net::URL getURL () const
 Returns the URL.
const std::multimap< std::string, std::string > & getHeaders () const
 Returns request headers.
const std::shared_ptr< const tenduke::http::HTTPRequestAuthenticator > & getRequestAuthenticator () const
 Returns HTTP request authenticator.
long getConnectionTimeoutMs () const
 Returns connection timeout in ms.
long getTimeoutMs () const
 Returns total time out in ms, 0 if the request does not time out.
bool hasBody () const
 Checks if request has body.

Constructor & Destructor Documentation

◆ HTTPRequest()

tenduke::http::HTTPRequest::HTTPRequest ( std::string method,
::tenduke::net::URL url,
const std::multimap< std::string, std::string > & headers = std::multimap<std::string, std::string>(),
std::shared_ptr< const tenduke::http::HTTPRequestAuthenticator > requestAuthenticator = nullptr,
std::string messageBody = "",
long connectionTimeoutMs = DEFAULT_CONNECTION_TIMEOUT_MS,
long timeoutMs = DEFAULT_TIMEOUT_MS )
inline

Constructs new instance.

Parameters
method-
url-
headers-
requestAuthenticator-
messageBody-
connectionTimeoutMs-
timeoutMs-

Member Function Documentation

◆ getConnectionTimeoutMs()

long tenduke::http::HTTPRequest::getConnectionTimeoutMs ( ) const
inline

Returns connection timeout in ms.

Returns
-

◆ getHeaders()

const std::multimap< std::string, std::string > & tenduke::http::HTTPRequest::getHeaders ( ) const
inline

Returns request headers.

Returns
-

◆ getMessageBody()

const std::string & tenduke::http::HTTPRequest::getMessageBody ( ) const
inline

Returns the message body.

Returns
-

◆ getMethod()

const std::string & tenduke::http::HTTPRequest::getMethod ( ) const
inline

Returns the method.

Returns
-

◆ getRequestAuthenticator()

const std::shared_ptr< const tenduke::http::HTTPRequestAuthenticator > & tenduke::http::HTTPRequest::getRequestAuthenticator ( ) const
inline

Returns HTTP request authenticator.

Returns
-

◆ getTimeoutMs()

long tenduke::http::HTTPRequest::getTimeoutMs ( ) const
inline

Returns total time out in ms, 0 if the request does not time out.

Returns
-

◆ getURL()

const ::tenduke::net::URL tenduke::http::HTTPRequest::getURL ( ) const
inline

Returns the URL.

Returns
-

◆ hasBody()

bool tenduke::http::HTTPRequest::hasBody ( ) const
inline

Checks if request has body.

Returns
-

The documentation for this class was generated from the following file: