FreeRTOS: HTTPS Client
HTTPS Client v1.0.0 library
Return to main page ↑
iot_https_utils.h File Reference

User facing HTTPS Client library utilities. More...

Go to the source code of this file.

Functions

IotHttpsReturnCode_t IotHttpsClient_GetUrlPath (const char *pUrl, size_t urlLen, const char **pPath, size_t *pPathLen)
 Retrieve the path from the input URL. More...
 
IotHttpsReturnCode_t IotHttpsClient_GetUrlAddress (const char *pUrl, size_t urlLen, const char **pAddress, size_t *pAddressLen)
 Retrieve the Address from the input URL. More...
 

Detailed Description

User facing HTTPS Client library utilities.

Function Documentation

◆ IotHttpsClient_GetUrlPath()

IotHttpsReturnCode_t IotHttpsClient_GetUrlPath ( const char *  pUrl,
size_t  urlLen,
const char **  pPath,
size_t *  pPathLen 
)

Retrieve the path from the input URL.

This function retrieves the location and length of the path from within the input the URL. The query is not included in the length returned.

The URL MUST start with "http://" or "https://" to find the path.

For example, if the URL is: pUrl = "https://www.somewebsite.com/path/to/item.txt?optionalquery=stuff"

*pPath = "/path/to/item.txt?optionalquery=stuff" *pPathLen = 17

Parameters
[in]pUrl- URL string to parse.
[in]urlLen- The length of the URL string input.
[out]pPath- pointer within input url that the path starts at.
[out]pPathLen- Length of the path.

◆ IotHttpsClient_GetUrlAddress()

IotHttpsReturnCode_t IotHttpsClient_GetUrlAddress ( const char *  pUrl,
size_t  urlLen,
const char **  pAddress,
size_t *  pAddressLen 
)

Retrieve the Address from the input URL.

This function retrieves the location and length of the address from within the input URL. The path and query are not included in the length returned.

The URL MUST start with "http://" or "https://" to find the address.

For example, if the URL is: pUrl = "https://www.somewebsite.com/path/to/item.txt?optionalquery=stuff"

*pAddress = "www.somewebsite.com/path/to/item.txt?optionalquery=stuff" *pAddressLen = 19

Parameters
[in]pUrl- URL string to parse.
[in]urlLen- The length of the URL string input.
[out]pAddress- pointer within input url that the address starts at.
[out]pAddressLen- Length of the address.
Returns
One of the following: