Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SecureHttpClient Class Reference
HTTPS Client based on mbed and wolfSSL HTTP Client. More...
#include <SecureHttpClient.h>
Public Member Functions | |
| HttpResult | basicAuth (const char *user, const char *password) |
| Provides a basic authentification feature (Base64 encoded username and password) Pass two NULL pointers to switch back to no authentication. | |
| HttpResult | get (const char *url, IHttpDataIn *pDataIn, int timeout=HTTP_CLIENT_DEFAULT_TIMEOUT) |
| Execute a GET request on the URL Blocks until completion. | |
| HttpResult | post (const char *url, const IHttpDataOut &dataOut, IHttpDataIn *pDataIn, int timeout=HTTP_CLIENT_DEFAULT_TIMEOUT) |
| Execute a POST request on the URL Blocks until completion. | |
| HttpResult | put (const char *url, const IHttpDataOut &dataOut, IHttpDataIn *pDataIn, int timeout=HTTP_CLIENT_DEFAULT_TIMEOUT) |
| Execute a PUT request on the URL Blocks until completion. | |
| HttpResult | del (const char *url, IHttpDataIn *pDataIn, int timeout=HTTP_CLIENT_DEFAULT_TIMEOUT) |
| Execute a DELETE request on the URL Blocks until completion. | |
| int | getHTTPResponseCode () |
| Get last request's HTTP response code. | |
Detailed Description
HTTPS Client based on mbed and wolfSSL HTTP Client.
Definition at line 60 of file SecureHttpClient.h.
Member Function Documentation
| HttpResult basicAuth | ( | const char * | user, |
| const char * | password | ||
| ) |
Provides a basic authentification feature (Base64 encoded username and password) Pass two NULL pointers to switch back to no authentication.
- Parameters:
-
user username to use for authentication, must remain valid durlng the whole HTTP session user password to use for authentication, must remain valid durlng the whole HTTP session
Definition at line 147 of file SecureHttpClient.cpp.
| HttpResult del | ( | const char * | url, |
| IHttpDataIn * | pDataIn, | ||
| int | timeout = HTTP_CLIENT_DEFAULT_TIMEOUT |
||
| ) |
Execute a DELETE request on the URL Blocks until completion.
- Parameters:
-
url : url on which to execute the request pDataIn : pointer to an IHttpDataIn instance that will collect the data returned by the request, can be NULL timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
- Returns:
- 0 on success, HTTP error (<0) on failure
Definition at line 176 of file SecureHttpClient.cpp.
| HttpResult get | ( | const char * | url, |
| IHttpDataIn * | pDataIn, | ||
| int | timeout = HTTP_CLIENT_DEFAULT_TIMEOUT |
||
| ) |
Execute a GET request on the URL Blocks until completion.
- Parameters:
-
url : url on which to execute the request pDataIn : pointer to an IHttpDataIn instance that will collect the data returned by the request, can be NULL timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
- Returns:
- 0 on success, HTTP error (<0) on failure
Definition at line 157 of file SecureHttpClient.cpp.
| int getHTTPResponseCode | ( | ) |
Get last request's HTTP response code.
- Returns:
- The HTTP response code of the last request
Definition at line 181 of file SecureHttpClient.cpp.
| HttpResult post | ( | const char * | url, |
| const IHttpDataOut & | dataOut, | ||
| IHttpDataIn * | pDataIn, | ||
| int | timeout = HTTP_CLIENT_DEFAULT_TIMEOUT |
||
| ) |
Execute a POST request on the URL Blocks until completion.
- Parameters:
-
url : url on which to execute the request dataOut : a IHttpDataOut instance that contains the data that will be posted pDataIn : pointer to an IHttpDataIn instance that will collect the data returned by the request, can be NULL timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
- Returns:
- 0 on success, HTTP error (<0) on failure
Definition at line 164 of file SecureHttpClient.cpp.
| HttpResult put | ( | const char * | url, |
| const IHttpDataOut & | dataOut, | ||
| IHttpDataIn * | pDataIn, | ||
| int | timeout = HTTP_CLIENT_DEFAULT_TIMEOUT |
||
| ) |
Execute a PUT request on the URL Blocks until completion.
- Parameters:
-
url : url on which to execute the request dataOut : a IHttpDataOut instance that contains the data that will be put pDataIn : pointer to an IHttpDataIn instance that will collect the data returned by the request, can be NULL timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
- Returns:
- 0 on success, HTTP error (<0) on failure
Definition at line 170 of file SecureHttpClient.cpp.
Generated on Tue Jul 12 2022 15:55:23 by
1.7.2