FreeRTOS: HTTPS Client
HTTPS Client v1.0.0 library
Return to main page ↑
IotHttpsClient_CancelResponseAsync

Cancel an Asynchronous response.

This will stop an asynchronous response. When an asynchronous response is stopped it will not proceed to do any of the following: send headers, send body, receive headers, or receive body. This depends on where in the process the response is. For example, if the response is cancelled after receiving the headers, then it will not attempt tp receive the body. A cancelled return code will be returned to the application.

If this is called during ANY of the asynchronous callbacks, then the library will stop processing the response when the callback returns. This is useful for any error conditions, found during the asynchronous callbacks, where the application wants to stop the rest of the response processing.

If the asynchronous response stops processing, the buffers configured in IotHttpsResponseInfo_t.userBuffer can be freed, modified, or reused only after the IotHttpsClientCallbacks_t.responseCompleteCallback in invoked.

Example Asynchronous Code

void applicationDefined_readReadyCallback(void * pPrivData, IotHttpsResponseHandle_t respHandle, IotHttpsReturnCode_t rc, uint16_t status)
{
...
if (status != IOT_HTTPS_STATUS_OK)
{
}
...
}
Parameters
[in]respHandle- Response handle associated with the response.
Returns
One of the following:
IotHttpsClient_CancelResponseAsync
IotHttpsReturnCode_t IotHttpsClient_CancelResponseAsync(IotHttpsResponseHandle_t respHandle)
Cancel an Asynchronous response.
Definition: iot_https_client.c:3184
IotHttpsResponseHandle_t
struct _httpsResponse * IotHttpsResponseHandle_t
Opaque handle of an HTTP response.
Definition: iot_https_types.h:280
IotHttpsReturnCode_t
IotHttpsReturnCode_t
Return codes of HTTPS Client functions.
Definition: iot_https_types.h:294