The t_httpc_req_read_cb definition specifies the format of the callback function that is called to pass a data sent request to the server (with PUT or POST).

Note: This function is always called from the same task context as t_httpc_req_open_cb().


t_httpc_ret httpc_req_read_cb (
    uint16_t                   http_req_hdl,
    const t_httpc_user_hdl     hdl,
    uint8_t * const            p_buf,
    const uint16_t             buf_len,
    uint16_t * const           p_rd_len )


Parameter Description Type
http_req_hdl The handle of the current request. uint16_t
hdl The internal handle returned by t_httpc_req_open_cb(). t_httpc_user_hdl
p_buf Where to write the request content data. uint8_t *
buf_len The length of the output buffer. uint16_t
p_rd_len Where to write the length of the request content data. uint16_t *

Return Codes

Code Description
HTTPC_SUCCESS Successful execution.
HTTPC_ERROR Operation failed.