|
Azure IoT middleware for FreeRTOS
|
The port file for HTTP APIs. More...
Go to the source code of this file.
Macros | |
| #define | azureiothttpHttpRangeRequestEndOfFile -1 |
| Value to request the end of the file. | |
Typedefs | |
| typedef AzureIoTHTTP_t * | AzureIoTHTTPHandle_t |
| The handle for the Azure HTTP client. | |
| typedef enum AzureIoTHTTPResult | AzureIoTHTTPResult_t |
| Azure HTTP return codes. | |
Enumerations | |
| enum | AzureIoTHTTPResult { eAzureIoTHTTPSuccess = 0 , eAzureIoTHTTPInvalidParameter , eAzureIoTHTTPNetworkError , eAzureIoTHTTPPartialResponse , eAzureIoTHTTPNoResponse , eAzureIoTHTTPInsufficientMemory , eAzureIoTHTTPSecurityAlertResponseHeadersSizeLimitExceeded , eAzureIoTHTTPSecurityAlertExtraneousResponseData , eAzureIoTHTTPSecurityAlertInvalidChunkHeader , eAzureIoTHTTPSecurityAlertInvalidProtocolVersion , eAzureIoTHTTPSecurityAlertInvalidStatusCode , eAzureIoTHTTPSecurityAlertInvalidCharacter , eAzureIoTHTTPSecurityAlertInvalidContentLength , eAzureIoTHTTPParserInternalError , eAzureIoTHTTPHeaderNotFound , eAzureIoTHTTPInvalidResponse , eAzureIoTHTTPError } |
| Azure HTTP return codes. | |
Functions | |
| AzureIoTHTTPResult_t | AzureIoTHTTP_Init (AzureIoTHTTPHandle_t xHTTPHandle, AzureIoTTransportInterface_t *pxHTTPTransport, const char *pucURL, uint32_t ulURLLength, const char *pucPath, uint32_t ulPathLength, char *pucHeaderBuffer, uint32_t ulHeaderBufferLength) |
| Initialize the Azure HTTP client. More... | |
| AzureIoTHTTPResult_t | AzureIoTHTTP_Request (AzureIoTHTTPHandle_t xHTTPHandle, int32_t lRangeStart, int32_t lRangeEnd, char *pucDataBuffer, uint32_t ulDataBufferLength, char **ppucOutData, uint32_t *pulOutDataLength) |
| Send an HTTP GET request. More... | |
| AzureIoTHTTPResult_t | AzureIoTHTTP_RequestSizeInit (AzureIoTHTTPHandle_t xHTTPHandle, AzureIoTTransportInterface_t *pxHTTPTransport, const char *pucURL, uint32_t ulURLLength, const char *pucPath, uint32_t ulPathLength, char *pucHeaderBuffer, uint32_t ulHeaderBufferLength) |
| Initialize a size request. More... | |
| int32_t | AzureIoTHTTP_RequestSize (AzureIoTHTTPHandle_t xHTTPHandle, char *pucDataBuffer, uint32_t ulDataBufferLength) |
| Send a size request. More... | |
| AzureIoTHTTPResult_t | AzureIoTHTTP_Deinit (AzureIoTHTTPHandle_t xHTTPHandle) |
| Deinitialize the Azure HTTP client. More... | |
The port file for HTTP APIs.
Used in ADU.
| AzureIoTHTTPResult_t AzureIoTHTTP_Deinit | ( | AzureIoTHTTPHandle_t | xHTTPHandle | ) |
Deinitialize the Azure HTTP client.
| [in] | xHTTPHandle | The HTTP handle to use for this operation. |
| eAzureIoTHTTPSuccess | if success. |
| Otherwise | if failure. |
| AzureIoTHTTPResult_t AzureIoTHTTP_Init | ( | AzureIoTHTTPHandle_t | xHTTPHandle, |
| AzureIoTTransportInterface_t * | pxHTTPTransport, | ||
| const char * | pucURL, | ||
| uint32_t | ulURLLength, | ||
| const char * | pucPath, | ||
| uint32_t | ulPathLength, | ||
| char * | pucHeaderBuffer, | ||
| uint32_t | ulHeaderBufferLength | ||
| ) |
Initialize the Azure HTTP client.
| [in] | xHTTPHandle | The HTTP handle to use for this operation. |
| [in] | pxHTTPTransport | The Azure IoT Transport interface to use for this operation. |
| [in] | pucURL | The URL to use for this request. |
| [in] | ulURLLength | The length pucURL. |
| [in] | pucPath | The path to use for this request. |
| [in] | ulPathLength | The length pucPath. |
| [out] | pucHeaderBuffer | The buffer into which the headers for the request will be placed. |
| [in] | ulHeaderBufferLength | The length of pucHeaderBuffer. |
| AzureIoTHTTPResult_t AzureIoTHTTP_Request | ( | AzureIoTHTTPHandle_t | xHTTPHandle, |
| int32_t | lRangeStart, | ||
| int32_t | lRangeEnd, | ||
| char * | pucDataBuffer, | ||
| uint32_t | ulDataBufferLength, | ||
| char ** | ppucOutData, | ||
| uint32_t * | pulOutDataLength | ||
| ) |
Send an HTTP GET request.
| [in] | xHTTPHandle | The HTTP handle to use for this operation. |
| [in] | lRangeStart | The start point for the request payload. |
| [in] | lRangeEnd | The end point for the request payload. |
| [out] | pucDataBuffer | The buffer into which the response header and payload will be placed. |
| [in] | ulDataBufferLength | The length of pucDataBuffer. |
| [out] | ppucOutData | The pointer to the point in the buffer where the payload starts. |
| [out] | pulOutDataLength | The length of the payload returned by ppucOutData. |
| int32_t AzureIoTHTTP_RequestSize | ( | AzureIoTHTTPHandle_t | xHTTPHandle, |
| char * | pucDataBuffer, | ||
| uint32_t | ulDataBufferLength | ||
| ) |
Send a size request.
| [in] | xHTTPHandle | The HTTP handle to use for this operation. |
| [out] | pucDataBuffer | The buffer where the response will be placed. |
| [in] | ulDataBufferLength | The size of pucDataBuffer. |
| The | size of the file if success. |
| -1 | if failure. |
| AzureIoTHTTPResult_t AzureIoTHTTP_RequestSizeInit | ( | AzureIoTHTTPHandle_t | xHTTPHandle, |
| AzureIoTTransportInterface_t * | pxHTTPTransport, | ||
| const char * | pucURL, | ||
| uint32_t | ulURLLength, | ||
| const char * | pucPath, | ||
| uint32_t | ulPathLength, | ||
| char * | pucHeaderBuffer, | ||
| uint32_t | ulHeaderBufferLength | ||
| ) |
Initialize a size request.
| [in] | xHTTPHandle | The HTTP handle to use for this operation. |
| [in] | pxHTTPTransport | The Azure IoT Transport interface to use for this operation. |
| [in] | pucURL | The URL to use for this request. |
| [in] | ulURLLength | The length pucURL. |
| [in] | pucPath | The path to use for this request. |
| [in] | ulPathLength | The length pucPath. |
| [out] | pucHeaderBuffer | The buffer into which the response will be placed. |
| [in] | ulHeaderBufferLength | The size of pucHeaderBuffer. |