20 #ifndef FREERDP_UTILS_HTTP_H
21 #define FREERDP_UTILS_HTTP_H
23 #include <freerdp/api.h>
27 HTTP_STATUS_CONTINUE = 100,
28 HTTP_STATUS_SWITCH_PROTOCOLS = 101,
30 HTTP_STATUS_CREATED = 201,
31 HTTP_STATUS_ACCEPTED = 202,
32 HTTP_STATUS_PARTIAL = 203,
33 HTTP_STATUS_NO_CONTENT = 204,
34 HTTP_STATUS_RESET_CONTENT = 205,
35 HTTP_STATUS_PARTIAL_CONTENT = 206,
36 HTTP_STATUS_WEBDAV_MULTI_STATUS = 207,
37 HTTP_STATUS_AMBIGUOUS = 300,
38 HTTP_STATUS_MOVED = 301,
39 HTTP_STATUS_REDIRECT = 302,
40 HTTP_STATUS_REDIRECT_METHOD = 303,
41 HTTP_STATUS_NOT_MODIFIED = 304,
42 HTTP_STATUS_USE_PROXY = 305,
43 HTTP_STATUS_REDIRECT_KEEP_VERB = 307,
44 HTTP_STATUS_BAD_REQUEST = 400,
45 HTTP_STATUS_DENIED = 401,
46 HTTP_STATUS_PAYMENT_REQ = 402,
47 HTTP_STATUS_FORBIDDEN = 403,
48 HTTP_STATUS_NOT_FOUND = 404,
49 HTTP_STATUS_BAD_METHOD = 405,
50 HTTP_STATUS_NONE_ACCEPTABLE = 406,
51 HTTP_STATUS_PROXY_AUTH_REQ = 407,
52 HTTP_STATUS_REQUEST_TIMEOUT = 408,
53 HTTP_STATUS_CONFLICT = 409,
54 HTTP_STATUS_GONE = 410,
55 HTTP_STATUS_LENGTH_REQUIRED = 411,
56 HTTP_STATUS_PRECOND_FAILED = 412,
57 HTTP_STATUS_REQUEST_TOO_LARGE = 413,
58 HTTP_STATUS_URI_TOO_LONG = 414,
59 HTTP_STATUS_UNSUPPORTED_MEDIA = 415,
60 HTTP_STATUS_RETRY_WITH = 449,
61 HTTP_STATUS_SERVER_ERROR = 500,
62 HTTP_STATUS_NOT_SUPPORTED = 501,
63 HTTP_STATUS_BAD_GATEWAY = 502,
64 HTTP_STATUS_SERVICE_UNAVAIL = 503,
65 HTTP_STATUS_GATEWAY_TIMEOUT = 504,
66 HTTP_STATUS_VERSION_NOT_SUP = 505
67 } FREERDP_HTTP_STATUS;
69 FREERDP_API BOOL freerdp_http_request(
const char* url,
const char* body,
long* status_code,
70 BYTE** response,
size_t* response_length);
72 FREERDP_API
const char* freerdp_http_status_string(
long status);
73 FREERDP_API
const char* freerdp_http_status_string_format(
long status,
char* buffer,
size_t size);