#include <Http.hpp>
Public Types | |
| enum | Status { Ok = 200, Created = 201, Accepted = 202, NoContent = 204, MultipleChoices = 300, MovedPermanently = 301, MovedTemporarily = 302, NotModified = 304, BadRequest = 400, Unauthorized = 401, Forbidden = 403, NotFound = 404, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceNotAvailable = 503, InvalidResponse = 1000, ConnectionFailed = 1001 } |
| Enumerate all the valid status codes returned in a HTTP response. More... | |
Public Member Functions | |
| Response () | |
| Default constructor. | |
| const std::string & | GetField (const std::string &Field) const |
| Get the value of a field. | |
| Status | GetStatus () const |
| Get the header's status code. | |
| unsigned int | GetMajorHttpVersion () const |
| Get the major HTTP version number of the response. | |
| unsigned int | GetMinorHttpVersion () const |
| Get the major HTTP version number of the response. | |
| const std::string & | GetBody () const |
| Get the body of the response. | |
Friends | |
| class | Http |
Definition at line 168 of file Http.hpp.
Enumerate all the valid status codes returned in a HTTP response.
| Ok | Most common code returned when operation was successful. |
| Created | The resource has successfully been created. |
| Accepted | The request has been accepted, but will be processed later by the server. |
| NoContent | Sent when the server didn't send any data in return. |
| MultipleChoices | The requested page can be accessed from several locations. |
| MovedPermanently | The requested page has permanently moved to a new location. |
| MovedTemporarily | The requested page has temporarily moved to a new location. |
| NotModified | For conditionnal requests, means the requested page hasn't changed and doesn't need to be refreshed. |
| BadRequest | The server couldn't understand the request (syntax error). |
| Unauthorized | The requested page needs an authentification to be accessed. |
| Forbidden | The requested page cannot be accessed at all, even with authentification. |
| NotFound | The requested page doesn't exist. |
| InternalServerError | The server encountered an unexpected error. |
| NotImplemented | The server doesn't implement a requested feature. |
| BadGateway | The gateway server has received an error from the source server. |
| ServiceNotAvailable | The server is temporarily unavailable (overloaded, in maintenance, ...). |
| InvalidResponse | Response is not a valid HTTP one. |
| ConnectionFailed | Connection with server failed. |
| sf::Http::Http::Response::Response | ( | ) |
| const std::string & sf::Http::Http::Response::GetBody | ( | ) | const |
Get the body of the response.
The body can contain :
| const std::string & sf::Http::Http::Response::GetField | ( | const std::string & | Field | ) | const |
| unsigned int sf::Http::Http::Response::GetMajorHttpVersion | ( | ) | const |
| unsigned int sf::Http::Http::Response::GetMinorHttpVersion | ( | ) | const |
| Http::Response::Status sf::Http::Http::Response::GetStatus | ( | ) | const |