DVBLink Remote API Library documentation  0.2.0-Master
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
dvblinkremotehttp::HttpWebRequest Class Reference

Class for defining a HTTP web request. More...

Public Member Functions

 HttpWebRequest (const std::string &url)
 Initializes a new instance of the dvblinkremotehttp::HttpWebRequest class.
 ~HttpWebRequest ()
 Destructor for cleaning up allocated memory.
std::string & GetUrl ()
 Gets the URL.
std::string & GetRequestData ()
 Gets the data to be sent in the request (using POST method).
void SetRequestData (const std::string &data)
 Sets the data to be sent in the request (using POST method).

Public Attributes

std::string Method
 The HTTP method to be used in request.
std::string ContentType
 The MIME type of the data to be sent in request (using POST method).
long ContentLength
 The length of the data to be sent in request (using POST method).
std::string UserName
 The user name to be used for basic authentication sent in request.
std::string Password
 The password to be used for basic authentication sent in request.

Detailed Description

Class for defining a HTTP web request.

This is used as input parameter for the HttpClient::SendRequest() method.

See Also
HttpClient::SendRequest()

Constructor & Destructor Documentation

dvblinkremotehttp::HttpWebRequest::HttpWebRequest ( const std::string &  url)

Initializes a new instance of the dvblinkremotehttp::HttpWebRequest class.

Parameters
urlA constant string representing the URL for which the request will be sent.
dvblinkremotehttp::HttpWebRequest::~HttpWebRequest ( )

Destructor for cleaning up allocated memory.

Member Function Documentation

std::string& dvblinkremotehttp::HttpWebRequest::GetRequestData ( )

Gets the data to be sent in the request (using POST method).

Returns
A string reference
std::string& dvblinkremotehttp::HttpWebRequest::GetUrl ( )

Gets the URL.

Returns
A string reference
void dvblinkremotehttp::HttpWebRequest::SetRequestData ( const std::string &  data)

Sets the data to be sent in the request (using POST method).

Parameters
dataA constant string reference representing the data to be sent in the request.

Member Data Documentation

long dvblinkremotehttp::HttpWebRequest::ContentLength

The length of the data to be sent in request (using POST method).

std::string dvblinkremotehttp::HttpWebRequest::ContentType

The MIME type of the data to be sent in request (using POST method).

std::string dvblinkremotehttp::HttpWebRequest::Method

The HTTP method to be used in request.

See Also
DVBLINK_REMOTE_HTTP_POST_METHOD for definition of the POST-method.
std::string dvblinkremotehttp::HttpWebRequest::Password

The password to be used for basic authentication sent in request.

std::string dvblinkremotehttp::HttpWebRequest::UserName

The user name to be used for basic authentication sent in request.