This class wraps an HTTP request, which is basically :
#include <Http.hpp>
Public Types | |
enum | Method { Get, Post, Head } |
Enumerate the available HTTP methods for a request. More... | |
Public Member Functions | |
Request (Method method=Get, const std::string &URI="/", const std::string &body="") | |
Default constructor. | |
void | SetField (const std::string &field, const std::string &value) |
Set the value of a field; the field is added if it doesn't exist. | |
void | SetMethod (Method method) |
Set the request method. | |
void | SetURI (const std::string &URI) |
Set the target URI of the request. | |
void | SetHttpVersion (unsigned int major, unsigned int minor) |
Set the HTTP version of the request. | |
void | SetBody (const std::string &body) |
Set the body of the request. | |
Friends | |
class | Http |
This class wraps an HTTP request, which is basically :
Definition at line 54 of file Http.hpp.
sf::Http::Request::Request | ( | Method | method = Get , |
|
const std::string & | URI = "/" , |
|||
const std::string & | body = "" | |||
) |
void sf::Http::Request::SetBody | ( | const std::string & | body | ) |
Set the body of the request.
This parameter is optional and makes sense only for POST requests. This parameter is empty by default
body | : Content of the request body |
This parameter is optional and makes sense only for POST requests. This parameter is empty by default
void sf::Http::Request::SetField | ( | const std::string & | field, | |
const std::string & | value | |||
) |
void sf::Http::Request::SetHttpVersion | ( | unsigned int | major, | |
unsigned int | minor | |||
) |
void sf::Http::Request::SetMethod | ( | Method | method | ) |
Set the request method.
This parameter is Http::Request::Get by default
method | : Method to use for the request |
This parameter is Get by default
void sf::Http::Request::SetURI | ( | const std::string & | URI | ) |