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

Asynchronous send of the the HTTPS request.

This function will invoke, as needed, each of the non-NULL callbacks configured in IotHttpsAsyncInfo_t.callbacks when the scheduled asynchronous request is progress. Please see IotHttpsClientCallbacks_t for information on each of the callbacks.

After this API is executed, the scheduled async response will store the response headers as received from the network, in the header buffer space configured in IotHttpsResponseInfo_t.userBuffer. If the configured IotHttpsResponseInfo_t.userBuffer is too small to fit the headers received, then headers that don't fit will be thrown away. Please see responseUserBufferMinimumSize for information about sizing the IotHttpsResponseInfo_t.userBuffer.

If IotHttpsRequestInfo_t.isNonPersistent is set to true, then the connection will disconnect, close, and clean all taken resources automatically after receiving the first response.

See connectionUserBufferMinimumSize for information about the user buffer configured in IotHttpsConnectionInfo_t.userBuffer needed to create a valid connection handle.

A IotHttpsRequestHandle_t cannot be schedule again or reused until the request has finished sending. The request has safely finished sending once IotHttpsClientCallbacks_t.readReadyCallback is invoked. After the IotHttpsClientCallbacks_t.readReadyCallback is invoked the IotHttpsRequestInfo_t.userBuffer can freed, modified, or reused.

Parameters
[in]connHandle- Handle from an HTTPS connection.
[in]reqHandle- Handle from a request created with IotHttpsClient_initialize_request.
[out]pRespHandle- HTTPS response handle.
[in]pRespInfo- HTTP response configuration information.
Returns
One of the following:
IotHttpsResponseHandle_t
struct _httpsResponse * IotHttpsResponseHandle_t
Opaque handle of an HTTP response.
Definition: iot_https_types.h:280
IotHttpsResponseInfo_t
HTTP request configuration.
Definition: iot_https_types.h:884
IotHttpsRequestHandle_t
struct _httpsRequest * IotHttpsRequestHandle_t
Opaque handle of an HTTP request.
Definition: iot_https_types.h:263
IotHttpsConnectionHandle_t
struct _httpsConnection * IotHttpsConnectionHandle_t
Opaque handle of an HTTP connection.
Definition: iot_https_types.h:248
IotHttpsClient_SendAsync
IotHttpsReturnCode_t IotHttpsClient_SendAsync(IotHttpsConnectionHandle_t connHandle, IotHttpsRequestHandle_t reqHandle, IotHttpsResponseHandle_t *pRespHandle, IotHttpsResponseInfo_t *pRespInfo)
Asynchronous send of the the HTTPS request.
Definition: iot_https_client.c:3198
IotHttpsReturnCode_t
IotHttpsReturnCode_t
Return codes of HTTPS Client functions.
Definition: iot_https_types.h:294