45 #ifndef M2MB_INC_HTTP_CLIENT_M2MB_HTTPC_H_ 46 #define M2MB_INC_HTTP_CLIENT_M2MB_HTTPC_H_ 77 #define M2MB_HTTPCLIENT_MAX_URL_LENGTH 1024 //was 256 78 #define M2MB_HTTPCLIENT_MAX_HOST_LENGTH 64 M2MB_STATUS_T m2mb_httpc_close(HANDLE handle)
closes an HTTP client session.
M2MB_STATUS_T m2mb_httpc_open(HANDLE *hndl, M2MB_HTTPC_OPEN_PARAMS_T *params)
create http client context
M2MB_STATUS_T m2mb_httpc_set_request(VOID *handle, M2MB_HTTPC_METHODS_E method, UINT8 *url)
Set the http request.
Socket IPv4/IPv6 Internet address union.
M2MB_HTTPC_STATES
HTTP client callback state.
M2MB_HTTPC_METHODS
supported http request method for use with m2mb_httpc_request.
enum M2MB_HTTPC_METHODS M2MB_HTTPC_METHODS_E
supported http request method for use with m2mb_httpc_request.
HTTP client configuration params structure for use in m2mb_http_set_cfg and m2mb_httpc_get_cfg APIs...
VOID(* M2MB_HTTPC_CB_T)(VOID *arg, M2MB_HTTPC_STATES_E state, M2MB_HTTPC_RESPONSE_T *value)
User registered callback for returning response message.
M2MB_STATUS_T m2mb_httpc_connect(HANDLE handle, UINT8 *url, UINT16 port)
Connects to an HTTP server in Blocking mode.
M2MB_STATUS_T m2mb_httpc_get_cfg(HANDLE handle, M2MB_HTTPC_CONF_ID_E conf_id, M2MB_HTTPC_CONF_PARAMS_T *conf_params)
get the http client session information
HANDLE M2MB_HTTPC_CTXT_HANDLE
HTTPC context handle. This is obtained from m2mb_httpc_open API and then used in subsequent HTTPC A...
HTTPC parameters required to open a client connection.
UINT16 httpc_max_body_len
M2MB_STATUS_T m2mb_httpc_set_cfg(HANDLE handle, M2MB_HTTPC_CONF_ID_E conf_id, M2MB_HTTPC_CONF_PARAMS_T *conf_params)
update the http client session configurations
union M2MB_HTTPC_CONF_PARAMS M2MB_HTTPC_CONF_PARAMS_T
HTTP client configuration params structure for use in m2mb_http_set_cfg and m2mb_httpc_get_cfg APIs...
struct M2MB_HTTPC_CONF_PARAMS::param param
struct M2MB_HTTPC_RESPONSE M2MB_HTTPC_RESPONSE_T
HTTP client response for use in user callback.
struct M2MB_HTTPC_OPEN_PARAMS M2MB_HTTPC_OPEN_PARAMS_T
HTTPC parameters required to open a client connection.
UINT16 httpc_max_Header_len
enum M2MB_HTTPC_CONF_ID M2MB_HTTPC_CONF_ID_E
HTTP client confg id for use in m2mb_http_set_cfg and m2mb_httpc_get_cfg APIs.
M2MB_HTTPC_CONF_ID
HTTP client confg id for use in m2mb_http_set_cfg and m2mb_httpc_get_cfg APIs.
M2MB_STATUS_T m2mb_httpc_send(VOID *handle, UINT8 isFirstPacket, UINT8 *body, UINT32 body_length, UINT32 total_length)
Send HTTP information from the http client session.
enum M2MB_HTTPC_STATES M2MB_HTTPC_STATES_E
HTTP client callback state.
M2MB_IP46_ADDR_T IP46_addr
HTTP client response for use in user callback.