Hello world example of a TLS client: fetch an HTTPS page. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-tls
HelloHttpsClient Class Reference
This class implements the logic for fetching a file from a webserver using a TCP socket and parsing the result. More...
#include <HelloHttpsClient.h>
Public Member Functions | |
HelloHttpsClient (const char *in_server_name, const char *in_server_addr, const uint16_t in_server_port) | |
Construct an HelloHttpsClient instance. | |
~HelloHttpsClient () | |
Free any allocated resources. | |
int | run () |
Start the connection to the server and request to read the file at HTTP_REQUEST_FILE_PATH. |
Detailed Description
This class implements the logic for fetching a file from a webserver using a TCP socket and parsing the result.
Definition at line 51 of file HelloHttpsClient.h.
Constructor & Destructor Documentation
HelloHttpsClient | ( | const char * | in_server_name, |
const char * | in_server_addr, | ||
const uint16_t | in_server_port | ||
) |
Construct an HelloHttpsClient instance.
- Parameters:
-
[in] in_server_name The server host name [in] in_server_addr The server domain/IP address [in] in_server_port The server port
Definition at line 71 of file HelloHttpsClient.cpp.
~HelloHttpsClient | ( | ) |
Free any allocated resources.
Definition at line 86 of file HelloHttpsClient.cpp.
Member Function Documentation
int run | ( | ) |
Start the connection to the server and request to read the file at HTTP_REQUEST_FILE_PATH.
- Returns:
- 0 if successful
Definition at line 97 of file HelloHttpsClient.cpp.
Generated on Tue Jul 12 2022 19:35:00 by 1.7.2