The tef::RequestHandler
class defines an interface to process incoming HTTP requests.
An extending class must implement the following methods:
virtual const char* |
Specifies the URL's path of an HTTP request to process. Example: "/helloworld" |
virtual void |
Processes the HTTP request. |
The tef::RequestContext
class wraps an incoming HTTP request.
|
Represents the HTTP request. |
|
Represents the HTTP response. |
The tef::RequestInput
class represents an HTTP request.
bool |
Indicates whether the HTTP connection uses HTTPS. |
const wchar_t* |
Returns the path of the HTTP request. |
|
Returns a value from the query string or HTML form of the HTTP request. |
The tef::RequestOutput
class represents an HTTP response.
|
Appends the data to the HTTP response body. |
int
|
Returns the HTTP status code. |
void
|
Indicates the end of the HTTP response. |
The tef::HttpClient
class allows to access other servers via HTTP.
|
Returns the URL string stream. |
|
Returns the HTTP headers stream. |
template<typename void int
|
Send the HTTP request. |
int
|
Returns the HTTP response status code. |
char*
|
Returns the HTTP response body. |
The tef::HttpClient::Builder
class allows to construct an HTTP request.
|
Appends the data to the stream. |
tef::HttpClient http; http.Url() << L"GET https://server.com/path?uid=" << uid; http.Headers() << L"If-Match: \"" << _etag << L"\"\r\n"; http.SendAsync([](tef::HttpClient& resp) { try { if( resp.Status() == 200 ) { int charge = resp.ResponseHeaderInt32(L"x-ms-request-charge"); ... } } catch(std::exception& e) { } });