Namespace: dmHttpClient
Language: C++
Type: Defold C++
File: http_client.h
Source: engine/dlib/src/dmsdk/dlib/http_client.h
Include: dmsdk/dlib/http_client.h
Http client functions.
Type: FUNCTION Parse the header data and make callbacks for each header/version entry and the start of the body.
Notes
Parameters
header_str (char*) - http response headers. Must be a null terminated string.user_data (const void*) - user data to the callbacks.end_of_receive (bool) - true if there is no more dataversion_cbk (function) - callback for the http version
void (version_cbk)(void user_data, int major, int minor, int status, const char* status_str);header_cbk (function) - callback for each header/value pair
void (header_cbk)(void user_data, const char key, const char value);body_cbk (function) - callback to note the start offset of the body data.
void (body_cbk)(void user_data, int offset)Returns
result (dmHttpClient::ParseResult) - the parse resultType: ENUM Header parse result enumeration.
Members
dmHttpClient::PARSE_RESULT_NEED_MORE_DATA - = 1dmHttpClient::PARSE_RESULT_OK - = 0dmHttpClient::PARSE_RESULT_SYNTAX_ERROR - = -1