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

An abstract base class for communicating with a server using the HTTP protocol. More...

Public Member Functions

virtual bool SendRequest (HttpWebRequest &request)=0
 Send a HTTP request.
virtual HttpWebResponseGetResponse ()=0
 Get the HTTP response returned from a HTTP request.
virtual void GetLastError (std::string &err)=0
 Gets a description of the last occured error.
virtual void UrlEncode (const std::string &str, std::string &outEncodedStr)=0
 URL encodes a string.

Detailed Description

An abstract base class for communicating with a server using the HTTP protocol.

Member Function Documentation

virtual void dvblinkremotehttp::HttpClient::GetLastError ( std::string &  err)
pure virtual

Gets a description of the last occured error.

Parameters
[in,out]errA string reference representing the string where the description of the last error will be provided.
virtual HttpWebResponse* dvblinkremotehttp::HttpClient::GetResponse ( )
pure virtual

Get the HTTP response returned from a HTTP request.

Returns
HttpWebResponse pointer representing the response returned from server.
virtual bool dvblinkremotehttp::HttpClient::SendRequest ( HttpWebRequest request)
pure virtual

Send a HTTP request.

Parameters
[in]requestA HttpWebRequest reference representing the HTTP request to be sent.
Returns
Boolean value representing if sending the HTTP request was successful or not.
virtual void dvblinkremotehttp::HttpClient::UrlEncode ( const std::string &  str,
std::string &  outEncodedStr 
)
pure virtual

URL encodes a string.

Parameters
[in]strA constant string reference representing the url to be encoded.
[in,out]outEncodedStrA constant string reference where the encoded url will be written.