FreeRTOS: HTTPS Client
HTTPS Client v1.0.0 library
Return to main page ↑
IotHttpsRequestInfo_t Struct Reference

HTTP request configuration. More...

#include <iot_https_types.h>

Data Fields

const char * pPath
 The absolute path to the HTTP request object. More...
 
uint32_t pathLen
 URI path length.
 
IotHttpsMethod_t method
 On of the HTTP method tokens defined in IotHttpsMethod_t. More...
 
const char * pHost
 Host address this request is intended for, e.g., "awsamazon.com". More...
 
uint32_t hostLen
 Host address length.
 
bool isNonPersistent
 Flag denoting if the connection should be non-persistent. More...
 
IotHttpsUserBuffer_t userBuffer
 Application owned buffer for storing the request headers and internal request context. More...
 
bool isAsync
 Indicator if this request is sync or async. More...
 
union {
   IotHttpsAsyncInfo_t *   pAsyncInfo
 Information specifically for Asynchronous requests.
 
   IotHttpsSyncInfo_t *   pSyncInfo
 Information specifically for synchronous requests.
 
u
 Specific information for either a synchronous request or an asynchronous request. More...
 

Detailed Description

HTTP request configuration.

Parameter for: IotHttpsClient_InitializeRequest.

This parameter is used to configure the request in https_client_function_initializerequest.

Note
The lengths of the strings in this struct should not include the NULL terminator. Strings in this struct do not need to be NULL-terminated.

Field Documentation

◆ pPath

const char* IotHttpsRequestInfo_t::pPath

The absolute path to the HTTP request object.

The absolute path includes the path to the file AND the optional query. An example URI path: "/v20160207/directives?query".

If this is NULL, a "/" will be added to the Request-Line automatically.

This is used to generate the Request-Line in the HTTP request message, see IotHttpsClient_InitializeRequest for more information.

◆ method

IotHttpsMethod_t IotHttpsRequestInfo_t::method

On of the HTTP method tokens defined in IotHttpsMethod_t.

This is used to generate the Request-Line in the HTTP request message, see IotHttpsClient_InitializeRequest for more information.

◆ pHost

const char* IotHttpsRequestInfo_t::pHost

Host address this request is intended for, e.g., "awsamazon.com".

This is the same as the address in IotHttpsConnectionInfo_t.pAddress. This is here in the request structure to automatically generate the "Host" header field in the header buffer space configured in IotHttpsRequestInfo_t.userBuffer. See IotHttpsClient_InitializeRequest for more information.

◆ isNonPersistent

bool IotHttpsRequestInfo_t::isNonPersistent

Flag denoting if the connection should be non-persistent.

If this flag is set to false, then the connection is persistent. When the connection is persistent, the HTTP header "Connection: keep-alive" is automatically added to the headers to send to the server. This header asks the server to not close the connection after sending the response.

If this flag is set to true, then the connection is non-persistent. When the connection is non-persistent, then HTTP header "Connection: close" is automatically added to the headers to send to the server. This header asks the server to close the connection after sending the response.

Please see https://tools.ietf.org/html/rfc2616#section-8.1.1 for more details.

◆ userBuffer

IotHttpsUserBuffer_t IotHttpsRequestInfo_t::userBuffer

Application owned buffer for storing the request headers and internal request context.

For an asynchronous request, if the application owns the memory for this buffer, then it must not be modified, freed, or reused until the the IotHttpsClientCallbacks_t.responseCompleteCallback is invoked.

Please see IotHttpsUserBuffer_t for more information.

◆ isAsync

bool IotHttpsRequestInfo_t::isAsync

Indicator if this request is sync or async.

Set this to false to use a synchronous request. Set this to true to use an asynchronous request.

◆ u

union { ... } IotHttpsRequestInfo_t::u

Specific information for either a synchronous request or an asynchronous request.

See IotHttpsAsyncInfo_t for information on pAsyncInfo. See IotHttpsSyncInfo_t for information on u.pSyncInfo.


The documentation for this struct was generated from the following file: