Request Hooks
µC/HTTP-client provides a set of hook functions to customize the stack behavior during an HTTP Request. Hook functions are called during each HTTP transaction processing and allows to personalize the HTTP requests to send and to recover the data included in HTTP responses received. Those are only available when the µC/HTTP-client internal task is active (HTTPc_CFG_MODE_ASYNC_TASK_EN
) and can be set up with the API function HTTPc_ReqSetParam()
.Hook Function Description Transaction Hooks On Transaction Complete Notify that an HTTP Transaction (Request + Response) is done. On Transaction Error Notify that an error occurred during an specific HTTP Transaction. Request Hooks On Request Query String Set a Query String field (Key-Value Pair) to add to the Request. On Request Header Set a Header field to add to the Request. On Request Body Set the data to put in the Request when using the Chunked Transfer Encoding. Response Hooks On Response Header Recover a header field received in the Response. On Response Body Recover each piece of data received in the Response. Form Field Hooks On Form Key-Value Extended Copy the data of the value into the transmission buffer. On Form Multipart File Copy the file data into the transmission buffer.