Callback Functions


These functions are the interface between the HTTP client and your file system. You can implement these as required.

Note:

  • You must use httpc_register_cb() to register the callback functions before starting a request.
  • All callback functions are called from the same HTTP client task context and are protected against concurrent calls. That is, no callback function can interrupt another callback function.
Function Description
t_httpc_req_open_cb() Called before a PUT or POST request is sent.
t_httpc_req_read_cb() Called to pass a data sent request to the server (with PUT or POST).
t_httpc_req_close_cb() Called when all data has been sent by using PUT or POST.
t_httpc_request_hdr_cb() Called to add headers before sending a request to the server.
t_httpc_resp_open_cb() Called when a response is received.
t_httpc_resp_write_cb() Called to pass data received in the response.
t_httpc_resp_close_cb() Called when all response data has been received. This can be used to close a file or to release any other resource.
t_httpc_response_hdr_cb() Called when a response is received.
t_httpc_next_request_cb() Called when a new request can be sent on a keep-alive connection.
t_httpc_conn_closed_cb() Called when a TCP connection is closed.