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

Represents an HTTP response. More...

#include <iot_https_internal.h>

Data Fields

IotLink_t link
 The link to insert the job in the connection's respQ.
 
uint8_t * pHeaders
 Pointer to the start of the headers buffer.
 
uint8_t * pHeadersEnd
 Pointer to the end of the headers buffer.
 
uint8_t * pHeadersCur
 Pointer to the next location to write in the headers buffer.
 
uint8_t * pBody
 Pointer to the start of the body buffer.
 
uint8_t * pBodyEnd
 Pointer to the end of the body buffer.
 
uint8_t * pBodyCur
 Pointer to the next location to write in the body buffer.
 
_httpParserInfo_t httpParserInfo
 Third party http-parser information.
 
uint16_t status
 The HTTP response status code of this response.
 
IotHttpsMethod_t method
 The method of the originating request.
 
IotHttpsResponseParserState_t parserState
 The current state of the parser. See #IotHttpsResponseParserState_t documentation for more details.
 
IotHttpsResponseBufferState_t bufferProcessingState
 Which buffer is currently being processed and for what. See #IotHttpsResponseBufferState_t documentation.
 
char * pReadHeaderField
 Header field that we want to read from the headers buffer when IotHttpsClient_ReadHeader() is called.
 
size_t readHeaderFieldLength
 Length of pReadHeaderField.
 
char * pReadHeaderValue
 Header value that we read from the headers buffer when IotHttpsClient_ReadHeader() is called.
 
size_t readHeaderValueLength
 Length of pReadHeaderValue.
 
bool foundHeaderField
 State to use during parsing to let us know when we found the header field in the https-parser callbacks. This is set to true when the header field is found in parser callback _httpParserOnHeaderFieldCallback(). On the following parser callback _httpParserOnHeaderValueCallback() we will store the value in pReadHeaderValue and then exit the parsing.
 
struct _httpsConnection * pHttpsConnection
 Connection associated with response. This is set during IotHttpsClient_SendAsync(). This is needed during the asynchronous workflow to receive data given the respHandle only in the callback.
 
bool isAsync
 This is set to true if this response is to be retrieved asynchronously. Set to false otherwise.
 
uint8_t * pBodyInHeaderBuf
 Pointer to the start of body inside the header buffer for copying to a body buffer provided later by the asynchronous response process.
 
uint8_t * pBodyCurInHeaderBuf
 Pointer to the next location to write body data during processing of the header buffer. This is necessary in case there is a chunk encoded HTTP response.
 
IotHttpsReturnCode_t bodyRxStatus
 The status of network receiving the HTTPS body to be returned during the IotHttpsClientCallbacks_t.readReadyCallback.
 
bool cancelled
 This is set to true to stop the request/response processing in the asynchronous request workflow.
 
IotSemaphore_t respFinishedSem
 This is for synchronous response to post that is finished being received. It is better to use a task event signal, but that is not implemented yet in the iot_threads.h API.
 
IotHttpsReturnCode_t syncStatus
 The status of the synchronous response.
 
bool reqFinishedSending
 This is set to true to when the request is finished being sent on the network. More...
 
IotHttpsClientCallbacks_tpCallbacks
 Pointer to the asynchronous request callbacks.
 
void * pUserPrivData
 User private data to hand back in the asynchronous callbacks for context.
 
bool isNonPersistent
 Non-persistent flag to indicate closing the connection immediately after receiving the response.
 

Detailed Description

Represents an HTTP response.

Field Documentation

◆ reqFinishedSending

bool _httpsResponse_t::reqFinishedSending

This is set to true to when the request is finished being sent on the network.

A request is not shared with multiple tasks, so only one task will update this. This is to let the let the network receive callback know that the request is fully pushed out to the server. This is also to let the disconnect know that the request is not using the network interface resources anymore.


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