31 #include <SFML/Network/Export.h>
32 #include <SFML/Network/Types.h>
33 #include <SFML/System/Time.h>
60 sfHttpNoContent = 204,
61 sfHttpResetContent = 205,
62 sfHttpPartialContent = 206,
65 sfHttpMultipleChoices = 300,
66 sfHttpMovedPermanently = 301,
67 sfHttpMovedTemporarily = 302,
68 sfHttpNotModified = 304,
71 sfHttpBadRequest = 400,
72 sfHttpUnauthorized = 401,
73 sfHttpForbidden = 403,
75 sfHttpRangeNotSatisfiable = 407,
78 sfHttpInternalServerError = 500,
79 sfHttpNotImplemented = 501,
80 sfHttpBadGateway = 502,
81 sfHttpServiceNotAvailable = 503,
82 sfHttpGatewayTimeout = 504,
83 sfHttpVersionNotSupported = 505,
86 sfHttpInvalidResponse = 1000,
87 sfHttpConnectionFailed = 1001
97 CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_create(
void);
105 CSFML_NETWORK_API
void sfHttpRequest_destroy(sfHttpRequest* httpRequest);
121 CSFML_NETWORK_API
void sfHttpRequest_setField(sfHttpRequest* httpRequest,
const char* field,
const char* value);
134 CSFML_NETWORK_API
void sfHttpRequest_setMethod(sfHttpRequest* httpRequest, sfHttpMethod method);
147 CSFML_NETWORK_API
void sfHttpRequest_setUri(sfHttpRequest* httpRequest,
const char* uri);
159 CSFML_NETWORK_API
void sfHttpRequest_setHttpVersion(sfHttpRequest* httpRequest,
unsigned int major,
unsigned int minor);
172 CSFML_NETWORK_API
void sfHttpRequest_setBody(sfHttpRequest* httpRequest,
const char* body);
180 CSFML_NETWORK_API
void sfHttpResponse_destroy(sfHttpResponse* httpResponse);
195 CSFML_NETWORK_API
const char* sfHttpResponse_getField(
const sfHttpResponse* httpResponse,
const char* field);
210 CSFML_NETWORK_API sfHttpStatus sfHttpResponse_getStatus(
const sfHttpResponse* httpResponse);
220 CSFML_NETWORK_API
unsigned int sfHttpResponse_getMajorVersion(
const sfHttpResponse* httpResponse);
230 CSFML_NETWORK_API
unsigned int sfHttpResponse_getMinorVersion(
const sfHttpResponse* httpResponse);
246 CSFML_NETWORK_API
const char* sfHttpResponse_getBody(
const sfHttpResponse* httpResponse);
254 CSFML_NETWORK_API sfHttp* sfHttp_create(
void);
262 CSFML_NETWORK_API
void sfHttp_destroy(sfHttp* http);
280 CSFML_NETWORK_API
void sfHttp_setHost(sfHttp* http,
const char* host,
unsigned short port);
301 CSFML_NETWORK_API sfHttpResponse* sfHttp_sendRequest(sfHttp* http,
const sfHttpRequest* request,
sfTime timeout);
304 #endif // SFML_HTTP_H