Sdk http client api documentation

Http client functions.

Namespace: dmHttpClient
Include: #include <dmsdk/dlib/hash.h>
ENUMS
ParseResult header parse result enumeration
FUNCTIONS
dmHttpClient::ParseResult ParseHeader(char* header_str, const void* user_data, bool end_of_receive, function version_cbk, function header_cbk, function body_cbk) parse the headers

Functions

ParseHeader

dmHttpClient::ParseResult ParseHeader(char* header_str, const void* user_data, bool end_of_receive, function version_cbk, function header_cbk, function body_cbk)

Parse the header data and make callbacks for each header/version entry and the start of the body.

PARAMETERS

char* header_str http response headers. Must be a null terminated string.
const void* user_data user data to the callbacks.
bool end_of_receive true if there is no more data
function version_cbk callback for the http version void (version_cbk)(void user_data, int major, int minor, int status, const char* status_str);
function header_cbk callback for each header/value pair void (header_cbk)(void user_data, const char key, const char value);
function body_cbk callback to note the start offset of the body data. void (body_cbk)(void user_data, int offset)

RETURNS

dmHttpClient::ParseResult the parse result

Enums

ParseResult

Header parse result enumeration.

dmHttpClient::PARSE_RESULT_NEED_MORE_DATA = 1
dmHttpClient::PARSE_RESULT_OK = 0
dmHttpClient::PARSE_RESULT_SYNTAX_ERROR = -1