30 #include "cpprest/http_msg.h"
32 namespace web {
namespace http
44 #define DAT(a,b) _ASYNCRTIMP const static utility::string_t a;
45 #include "cpprest/details/http_constants.dat"
56 #define _CHARSET_TYPES
57 #define DAT(a,b) _ASYNCRTIMP const static utility::string_t a;
58 #include "cpprest/details/http_constants.dat"
66 bool is_content_type_textual(
const utility::string_t &content_type);
71 bool is_content_type_json(
const utility::string_t &content_type);
77 void parse_content_type_and_charset(
const utility::string_t &content_type, utility::string_t &content, utility::string_t &charset);
82 utility::string_t get_default_charset(
const utility::string_t &content_type);
87 utility::string_t get_default_reason_phrase(status_code code);
93 utility::string_t convert_utf16_to_string_t(utf16string src);
94 utf16string convert_utf16_to_utf16(utf16string src);
95 std::string convert_utf16_to_utf8(utf16string src);
96 utility::string_t convert_utf16le_to_string_t(utf16string src,
bool erase_bom);
97 std::string convert_utf16le_to_utf8(utf16string src,
bool erase_bom);
98 utility::string_t convert_utf16be_to_string_t(utf16string src,
bool erase_bom);
99 std::string convert_utf16be_to_utf8(utf16string src,
bool erase_bom);
100 utf16string convert_utf16be_to_utf16le(utf16string src,
bool erase_bom);
103 _ASYNCRTIMP
void __cdecl ltrim_whitespace(utility::string_t &str);
104 _ASYNCRTIMP
void __cdecl rtrim_whitespace(utility::string_t &str);
105 _ASYNCRTIMP
void __cdecl trim_whitespace(utility::string_t &str);
107 bool validate_method(
const utility::string_t&
method);
110 namespace chunked_encoding
113 static const size_t additional_encoding_space = 12;
114 static const size_t data_offset = additional_encoding_space-2;
124 _ASYNCRTIMP
size_t __cdecl add_chunked_delimiters(_Out_writes_(buffer_size) uint8_t *data, _In_
size_t buffer_size,
size_t bytes_read);
Constants for charset types.
Definition: http_helpers.h:53
The web namespace contains functionality common to multiple protocols like HTTP and WebSockets...
Definition: base_uri.h:37
utility::string_t method
Predefined method strings for the standard HTTP methods mentioned in the HTTP 1.1 specification...
Definition: http_msg.h:62
Constants for MIME types.
Definition: http_helpers.h:40