/
Request Hooks

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().

Table - Request Hooks
Hook FunctionDescription
Transaction Hooks
On Transaction CompleteNotify that an HTTP Transaction (Request + Response) is done.
On Transaction ErrorNotify that an error occurred during an specific HTTP Transaction.
Request Hooks
On Request Query StringSet a Query String field (Key-Value Pair) to add to the Request.
On Request HeaderSet a Header field to add to the Request.
On Request BodySet the data to put in the Request when using the Chunked Transfer Encoding.
Response Hooks
On Response HeaderRecover a header field received in the Response.
On Response BodyRecover each piece of data received in the Response.
Form Field Hooks
On Form Key-Value ExtendedCopy the data of the value into the transmission buffer.
On Form Multipart FileCopy the file data into the transmission buffer.


Related content

On Request Body Received Hook
On Request Body Received Hook
More like this
Add Additional Header fields to an HTTP Request
Add Additional Header fields to an HTTP Request
More like this
Retrieve HTTP Response Data
Retrieve HTTP Response Data
More like this
HTTP Client Request Object Setup
HTTP Client Request Object Setup
More like this
On Request Header
More like this