24 #ifndef GEPS_INC_HTTP_CLIENT_M2MB_HTTPC_H_ 25 #define GEPS_INC_HTTP_CLIENT_M2MB_HTTPC_H_ 49 #define M2MB_HTTPC_DEBUG_PRINT_ENABLE 50 #ifdef M2MB_HTTPC_DEBUG_PRINT_ENABLE 52 #define M2MB_HTTPC_DBG_PRINTF m2mb_dbg_consol_print 54 #define M2MB_HTTPC_DBG_PRINTF(...) 134 #define HTTPCLIENT_MAX_URL_LENGTH 128 269 UINT16 httpc_max_body_len,
270 UINT16 httpc_max_Header_len,
271 UINT16 httpc_Rx_Buffer_Size,
M2MB_HTTPC_RESULT_E m2mb_httpc_set_request(VOID *handle, M2MB_HTTPC_METHODS_E method, UINT8 *url)
Set the http request.
M2MB_HTTPC_RESULT_E m2mb_httpc_session_abort(VOID *handle)
Aborts an HTTP client session.
M2MB_HTTPC_STATES
HTTP client callback state.
M2MB_SSL_CTXT_HANDLE ssl_handle
struct M2MB_HTTPC_RESPONSE M2MB_HTTPC_RESPONSE_T
HTTP client response.
enum M2MB_HTTPC_METHODS M2MB_HTTPC_METHODS_E
For use with m2mb_httpc_request.
M2MB_HTTPC_RESULT_E m2mb_httpc_clear_all_headers(VOID *handle)
Clears the header field for an HTTP client session.
struct M2MB_HTTPC_CTX M2MB_HTTPC_CTX_T
HANDLE M2MB_SSL_CTXT_HANDLE
SSL context handle. This is obtained from m2mb_ssl_create_ctxt API and then used in subsequent SSL ...
M2MB_HTTPC_RESULT_E m2mb_httpc_connect(VOID *handle, UINT8 *url, UINT16 port)
Connects to an HTTP server in Blocking mode.
#define HTTPCLIENT_MAX_URL_LENGTH
M2MB_HTTPC_RESULT_E m2mb_httpc_session_getInfo(VOID *handle, M2MB_IP46_ADDR_T *ipv6, INT32 *socket)
Sets HTTP socket information from the http client session.
UINT8 url[HTTPCLIENT_MAX_URL_LENGTH+1]
M2MB_HTTPC_RESULT_E m2mb_httpc_send(VOID *handle, UINT8 isFirstPacket, UINT8 *body, UINT32 body_length, UINT32 total_length)
Send HTTP information from the http client session.
M2MB_HTTPC_RESULT_E m2mb_httpc_start()
(Re)starts the HTTP client module.
M2MB_HTTPC_RESULT_E m2mb_httpc_enable_http_response_header(VOID *handle, UINT16 enable)
Enables/disables the addition of an HTTP header in a session callback.
M2MB_HTTPC_RESULT_E m2mb_httpc_disconnect(VOID *handle)
Disconnects from an HTTP server .
M2MB_HTTPC_RESULT_E m2mb_httpc_set_header(VOID *handle, UINT8 *hdr_name, UINT8 *hdr_value)
Sets the header field for an HTTP client session.
enum M2MB_HTTPC_RESULT M2MB_HTTPC_RESULT_E
M2MB_HTTPC_RESULT_E m2mb_httpc_set_request_body(VOID *handle, UINT8 *body, UINT32 body_length, UINT32 total_length)
Sets the body on an HTTP client session.
M2MB_HTTPC_RESULT_E m2mb_httpc_request(VOID *handle, M2MB_HTTPC_METHODS_E method, UINT8 *url)
Send an HTTP request to an HTTP server or proxy.
UINT8 chunksendInprogress
M2MB_HTTPC_METHODS_E method
Socket IPv4/IPv6 Internet address union.
M2MB_HTTPC_RESULT_E m2mb_httpc_set_cgi_params(VOID *handle, UINT8 *arg, UINT8 *value)
Forms a URL-encoded string on an HTTP client session.
M2MB_HTTPC_METHODS
For use with m2mb_httpc_request.
This file contains the public APIs and structures of the debug module.
VOID * m2mb_httpc_session_create(UINT32 timeout, M2MB_HTTPC_CB_T cb, VOID *cb_arg, UINT16 httpc_max_body_len, UINT16 httpc_max_Header_len, UINT16 httpc_Rx_Buffer_Size, VOID *m2mbSslCtx)
create http client session.
VOID(* M2MB_HTTPC_CB_T)(VOID *arg, signed int state, VOID *value)
User registered callback for returning response message.
enum M2MB_HTTPC_STATES M2MB_HTTPC_STATES_E
HTTP client callback state.
M2MB_HTTPC_RESULT_E m2mb_httpc_stop()
Stops the HTTP client module.