NetBurner 3.5.6
PDF Version |
Topics | |
Web Client Error Codes | |
Classes | |
class | ParsedURI |
Parsed Uniform Resource Identifier Class (URI) More... | |
class | buffer_object |
Base class for web client response buffers. More... | |
class | SimpleBufferObject |
Class for web client response buffers. More... | |
class | StringBufferObject |
Class for NBString-based web client response buffers. More... | |
Functions | |
void | SetHttpDiag (bool b) |
Enable/disable Web Client HTTP diagnostics to the console port. | |
void | SetHttpDiag (int level) |
Enable/disable Web Client HTTP diagnostics to the console port. | |
int | DoMultipartStartHttp (HttpMethod method, ParsedURI &TheUri, const char *separator, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND, uint32_t contentLength=0) |
Start a multipart HTTP post using a pre-parsed URI object. | |
int | DoMultipartStartHttp (HttpMethod method, const char *pUrl, const char *separator, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND, uint32_t contentLength=0) |
Start a multipart HTTP post using a pointer to a URL. | |
int | DoMultipartStartPost (ParsedURI &TheUri, const char *separator, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND, uint32_t contentLength=0) |
Start a multipart HTTP post using a pre-parsed URI object. | |
int | DoMultipartStartPost (const char *pUrl, const char *separator, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND, uint32_t contentLength=0) |
Start a multipart HTTP post using a pointer to a URL. | |
void | DoMultipartItem (int tcpfd, const char *Disposition, const char *separator, const unsigned char *data, int len) |
Send a multipart item. | |
void | DoMultipartBoundary (int tcpfd, const char *Disposition, const char *separator) |
Send a multipart boundary. | |
bool | DoMultipartFinished (int tcpfd, const char *separator, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Finish sending the multipart request and parse the response into a buffer. | |
bool | DoMultipartFinished (int tcpfd, const char *separator, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoUrlEncodedFormHttp (HttpMethod method, ParsedURI &TheUri, char *headers, char *form_data, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT) |
Send a JSON file using a HTTP Form and a a ParsedURI object. | |
bool | DoUrlEncodedFormPost (ParsedURI &TheUri, char *headers, char *form_data, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT) |
Post a JSON file using a HTTP Form Post and a a ParsedURI object. | |
bool | DoUrlEncodedFormHttp (HttpMethod method, ParsedURI &TheUri, char *headers, char *form_data, NBString &result_string, uint16_t TIMEOUT_WAIT) |
bool | DoUrlEncodedFormPost (ParsedURI &TheUri, char *headers, char *form_data, NBString &result_string, uint16_t TIMEOUT_WAIT) |
bool | DoUrlEncodedFormHttp (HttpMethod method, const char *pUrl, char *headers, char *form_data, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT) |
bool | DoUrlEncodedFormPost (const char *pUrl, char *headers, char *form_data, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT) |
bool | DoUrlEncodedFormPost (const char *pUrl, char *headers, char *form_data, NBString &result_string, uint16_t TIMEOUT_WAIT) |
bool | DoJsonHttp (HttpMethod method, const char *pUrl, const char *Json_Data_To_Post, buffer_object &result_buffer, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Post a JSON file using a HTTP POST and a URL string and pointer to JSON data. | |
bool | DoJsonPost (const char *pUrl, const char *Json_Data_To_Post, buffer_object &result_buffer, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Post a JSON file using a HTTP POST and a URL string and pointer to JSON data. | |
bool | DoJsonHttp (HttpMethod method, const char *pUrl, const char *Json_Data_To_Post, NBString &result_string, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (const char *pUrl, const char *Json_Data_To_Post, NBString &result_string, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttp (HttpMethod method, ParsedURI &TheUri, const char *Json_Data_To_Post, buffer_object &result_buffer, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (ParsedURI &TheUri, const char *Json_Data_To_Post, buffer_object &result_buffer, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttp (HttpMethod method, ParsedURI &TheUri, const char *Json_Data_To_Post, NBString &result_string, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (ParsedURI &TheUri, const char *Json_Data_To_Post, NBString &result_string, const char *AdditionalHeaders=NULL, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttp (HttpMethod method, const char *pUrl, ParsedJsonDataSet &jsonout, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (const char *pUrl, ParsedJsonDataSet &jsonout, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttp (HttpMethod method, const char *pUrl, ParsedJsonDataSet &jsonout, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (const char *pUrl, ParsedJsonDataSet &jsonout, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttp (HttpMethod method, ParsedURI &TheUri, ParsedJsonDataSet &jsonout, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (ParsedURI &TheUri, ParsedJsonDataSet &jsonout, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttp (HttpMethod method, ParsedURI &TheUri, ParsedJsonDataSet &jsonout, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPost (ParsedURI &TheUri, ParsedJsonDataSet &jsonout, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttpFile (HttpMethod method, const char *pUrl, const char *FragmentName, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Send a JSON file using HTTP and a URL string. | |
bool | DoJsonPostHttpFile (const char *pUrl, const char *FragmentName, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Post a JSON file using HTTP and a URL string. | |
bool | DoJsonHttpFile (HttpMethod method, const char *pUrl, const char *FragmentName, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPostHttpFile (const char *pUrl, const char *FragmentName, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonHttpFile (HttpMethod method, ParsedURI &TheUri, const char *FragmentName, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Send a JSON file using HTTP and a ParsedURI object. | |
bool | DoJsonPostHttpFile (ParsedURI &TheUri, const char *FragmentName, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Post a JSON file using HTTP and a ParsedURI object. | |
bool | DoJsonHttpFile (HttpMethod method, ParsedURI &TheUri, const char *FragmentName, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoJsonPostHttpFile (ParsedURI &TheUri, const char *FragmentName, NBString &result_string, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoHttp (HttpMethod method, ParsedURI &TheUri, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoGet (ParsedURI &TheUri, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoHttp (HttpMethod method, ParsedURI &TheUri, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoGet (ParsedURI &TheUri, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoHttpEx (HttpMethod method, ParsedURI &TheUri, const char *headers, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoGetEx (ParsedURI &TheUri, const char *headers, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoHttpEx (HttpMethod method, ParsedURI &TheUri, const char *headers, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoGetEx (ParsedURI &TheUri, const char *headers, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoHttp (HttpMethod method, const char *pUrl, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS request using a pointer to a URL string. | |
bool | DoGet (const char *pUrl, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS GET request using a pointer to a URL string. | |
bool | DoHttp (HttpMethod method, const char *pUrl, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoGet (const char *pUrl, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoHttpEx (HttpMethod method, const char *pUrl, const char *headers, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS request using a pointer to a URL string. | |
bool | DoGetEx (const char *pUrl, const char *headers, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS GET request using a pointer to a URL string. | |
bool | DoHttpEx (HttpMethod method, const char *pUrl, const char *headers, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
bool | DoGetEx (const char *pUrl, const char *headers, NBString &result_string, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
int | DoHttp (HttpMethod method, ParsedURI &TheUri, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS request using a reference to a parsed Uniform Resource Identifier (URI) | |
int | DoHttpEx (HttpMethod method, ParsedURI &TheUri, const char *headers, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS request using a reference to a parsed Uniform Resource Identifier (URI) | |
int | DoHttp (HttpMethod method, const char *pUrl, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS request using a pointer to a URL string. | |
int | DoHttpEx (HttpMethod method, const char *pUrl, const char *headers, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS request using a pointer to a URL string. | |
int | DoGet (ParsedURI &TheUri, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS GET request using a reference to a parsed Uniform Resource Identifier (URI) | |
int | DoGetEx (ParsedURI &TheUri, const char *headers, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS GET request using a reference to a parsed Uniform Resource Identifier (URI) | |
int | DoGet (const char *pUrl, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS GET request using a pointer to a URL string. | |
int | DoGetEx (const char *pUrl, const char *headers, unsigned char *result, int maxl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a HTTP/HTTPS GET request using a pointer to a URL string. | |
int | DoGetUpdate (ParsedURI &TheUri, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a firmware update from the specified URI. | |
int | DoGetUpdate (const char *pUrl, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND) |
Execute a firmware update from the specified URI. | |
int | PopulateAuthHeader (const char *user, const char *password, char *buffer, int maxlen) |
Fill in a username and password into a buffer for use as an extra header. | |
bool | DoActualClientRequest (ParsedURI &TheUri, uint16_t &next_time_delay) |
Callback to specify for performing and handle a WebClient request. | |
bool | StartWebClient (int prio, const char *url1, const char *url2=NULL, bool bDoNtp=false) |
Start the web client using a URL string. | |
bool | StartWebClient (int prio, const NBString &url1, const NBString &url2, bool bDoNtp=false) |
Start the web client using a NBString. | |
bool | StartWebClient (int prio, const NBString &url1, bool bDoNtp=false) |
Start the web client using a NBString. | |
Variables | |
WebErrorReporterFunc * | pWebErrorReporter |
Set this variable to a callback function to specify a handler for errors. | |
#include< http_funcs.h>
Functions for interacting with the web, like HTTP GET/POST requests.
#include< web_client.h>
Functions for instantiating a periodic web client
bool DoActualClientRequest | ( | ParsedURI & | TheUri, |
uint16_t & | next_time_delay ) |
#include <web_client.h>
Callback to specify for performing and handle a WebClient request.
TheUri | Pointer to a ParsedURI object (representing the URL) |
next_time_delay | Pointer to the number of ticks to wait before the next request |
|
inline |
#include <http_funcs.h>
Execute a HTTP/HTTPS GET request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
&result_buffer | Reference to the memory buffer in which to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Execute a HTTP/HTTPS GET request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
&TheUri | Reference to the pre-parsed URI. |
&result_buffer | Reference to the location to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Execute a HTTP/HTTPS GET request using a reference to a parsed Uniform Resource Identifier (URI)
This function uses a reference to a parsed URI, providing faster execution and avoiding parsing a URL, DNS, etc.
TheUri | Reference to the ParsedURI object. |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
Execute a HTTP/HTTPS GET request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
&result_buffer | Reference to the memory buffer in which to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Execute a HTTP/HTTPS GET request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
&TheUri | Reference to the pre-parsed URI. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
&result_buffer | Reference to the location to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Execute a HTTP/HTTPS GET request using a reference to a parsed Uniform Resource Identifier (URI)
This function uses a reference to a parsed URI, providing faster execution and avoiding parsing a URL, DNS, etc.
TheUri | Reference to the ParsedURI object. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
int DoGetUpdate | ( | const char * | pUrl, |
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a firmware update from the specified URI.
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
int DoGetUpdate | ( | ParsedURI & | TheUri, |
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a firmware update from the specified URI.
TheUri | Reference to the ParsedURI object. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
bool DoHttp | ( | HttpMethod | method, |
const char * | pUrl, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a HTTP/HTTPS request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
method | HTTP Method to use |
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
&result_buffer | Reference to the memory buffer in which to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
int DoHttp | ( | HttpMethod | method, |
const char * | pUrl, | ||
unsigned char * | result, | ||
int | maxl, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a HTTP/HTTPS request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
method | HTTP Method to use |
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
bool DoHttp | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
method | HTTP Method to use |
&TheUri | Reference to the pre-parsed URI. |
&result_buffer | Reference to the location to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
int DoHttp | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
unsigned char * | result, | ||
int | maxl, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a HTTP/HTTPS request using a reference to a parsed Uniform Resource Identifier (URI)
This function uses a reference to a parsed URI, providing faster execution and avoiding parsing a URL, DNS, etc.
method | HTTP Method to use |
TheUri | Reference to the ParsedURI object. |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
bool DoHttpEx | ( | HttpMethod | method, |
const char * | pUrl, | ||
const char * | headers, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a HTTP/HTTPS request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
method | HTTP Method to use |
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
&result_buffer | Reference to the memory buffer in which to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
int DoHttpEx | ( | HttpMethod | method, |
const char * | pUrl, | ||
const char * | headers, | ||
unsigned char * | result, | ||
int | maxl, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a HTTP/HTTPS request using a pointer to a URL string.
This function will parse the URL string to connect to the host.
method | HTTP Method to use |
pUrl | Pointer to a URL string. A DNS lookup will be done if necessary. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
bool DoHttpEx | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
const char * | headers, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
&TheUri | Reference to the pre-parsed URI. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
&result_buffer | Reference to the location to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
int DoHttpEx | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
const char * | headers, | ||
unsigned char * | result, | ||
int | maxl, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Execute a HTTP/HTTPS request using a reference to a parsed Uniform Resource Identifier (URI)
This function uses a reference to a parsed URI, providing faster execution and avoiding parsing a URL, DNS, etc.
method | HTTP Method to use |
TheUri | Reference to the ParsedURI object. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
result | Pointer to the buffer in which to store the result. |
maxl | Maximum length of the result buffer. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
bool DoJsonHttp | ( | HttpMethod | method, |
const char * | pUrl, | ||
const char * | Json_Data_To_Post, | ||
buffer_object & | result_buffer, | ||
const char * | AdditionalHeaders = NULL, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Post a JSON file using a HTTP POST and a URL string and pointer to JSON data.
method | HTTP Method to use |
pUrl | Pointer to a URL string. |
Json_Data_To_Post | Pointer to serialized JSON data to send |
&result_buffer | Reference to the location in which to store the result. |
AdditionalHeaders | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
bool DoJsonHttp | ( | HttpMethod | method, |
const char * | pUrl, | ||
ParsedJsonDataSet & | jsonout, | ||
buffer_object & | result_buffer, | ||
const char * | AdditionalHeaders, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pUrl | Pointer to a URL string. |
jsonout | Reference to ParsedJsonDataSet to send. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
bool DoJsonHttp | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
const char * | Json_Data_To_Post, | ||
buffer_object & | result_buffer, | ||
const char * | AdditionalHeaders = NULL, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&TheUri | Reference to the pre-parsed URI. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
bool DoJsonHttp | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
ParsedJsonDataSet & | jsonout, | ||
buffer_object & | result_buffer, | ||
const char * | AdditionalHeaders, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool DoJsonHttpFile | ( | HttpMethod | method, |
const char * | pUrl, | ||
const char * | FragmentName, | ||
buffer_object & | result_buffer, | ||
const char * | AdditionalHeaders, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Send a JSON file using HTTP and a URL string.
method | HTTP Method to use |
pUrl | Pointer to a URL string. |
FragmentName | |
&result_buffer | Reference to the location in which to store the result. |
AdditionalHeaders | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
bool DoJsonHttpFile | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
const char * | FragmentName, | ||
buffer_object & | result_buffer, | ||
const char * | AdditionalHeaders, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Send a JSON file using HTTP and a ParsedURI object.
method | HTTP Method to use (Post, Put, or Patch) |
&TheUri | Reference to the pre-parsed URI. |
FragmentName | |
&result_buffer | Reference to the location in which to store the result. |
AdditionalHeaders | |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Post a JSON file using a HTTP POST and a URL string and pointer to JSON data.
pUrl | Pointer to a URL string. |
Json_Data_To_Post | Pointer to serialized JSON data to send |
&result_buffer | Reference to the location in which to store the result. |
AdditionalHeaders | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pUrl | Pointer to a URL string. |
jsonout | Reference to ParsedJsonDataSet to send. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&TheUri | Reference to the pre-parsed URI. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
#include <http_funcs.h>
Post a JSON file using HTTP and a URL string.
pUrl | Pointer to a URL string. |
FragmentName | |
&result_buffer | Reference to the location in which to store the result. |
AdditionalHeaders | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Post a JSON file using HTTP and a ParsedURI object.
&TheUri | Reference to the pre-parsed URI. |
FragmentName | |
&result_buffer | Reference to the location in which to store the result. |
AdditionalHeaders | |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
void DoMultipartBoundary | ( | int | tcpfd, |
const char * | Disposition, | ||
const char * | separator ) |
#include <http_funcs.h>
Send a multipart boundary.
tcpfd | TCP file descriptor returned from DoMultipartStartPost() |
Disposition | Content disposition field of multipart body |
separator | Separator string to use as the part delimiter between multipart posts. |
bool DoMultipartFinished | ( | int | tcpfd, |
const char * | separator, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND ) |
#include <http_funcs.h>
Finish sending the multipart request and parse the response into a buffer.
tcpfd | TCP file descriptor returned from DoMultipartStartPost() |
separator | Separator string to use as the part delimiter between multipart posts. |
result_buffer | Reference to buffer to store response from the server. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString to store response from the server. |
void DoMultipartItem | ( | int | tcpfd, |
const char * | Disposition, | ||
const char * | separator, | ||
const unsigned char * | data, | ||
int | len ) |
#include <http_funcs.h>
Send a multipart item.
tcpfd | TCP file descriptor returned from DoMultipartStartPost() |
Disposition | Content disposition field of multipart body |
separator | Separator string to use as the part delimiter between multipart posts. |
data | Item data |
len | Data length |
int DoMultipartStartHttp | ( | HttpMethod | method, |
const char * | pUrl, | ||
const char * | separator, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND, | ||
uint32_t | contentLength = 0 ) |
#include <http_funcs.h>
Start a multipart HTTP post using a pointer to a URL.
method | HTTP Method to use |
pUrl | Pointer to a URL string. |
separator | Separator string to use as the part delimiter between multipart posts. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
contentLength | If given, content length for the entire multipart post. |
int DoMultipartStartHttp | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
const char * | separator, | ||
uint16_t | TIMEOUT_WAIT = 10 *TICKS_PER_SECOND, | ||
uint32_t | contentLength = 0 ) |
#include <http_funcs.h>
Start a multipart HTTP post using a pre-parsed URI object.
method | HTTP Method to use |
&TheUri | Reference to the pre-parsed URI object. |
separator | Separator string to use as the part delimiter between multipart posts. |
TIMEOUT_WAIT | Timeout in seconds to wait for a response. |
contentLength | If given, content length for the entire multipart post. |
|
inline |
#include <http_funcs.h>
Start a multipart HTTP post using a pointer to a URL.
pUrl | Pointer to a URL string. |
separator | Separator string to use as the part delimiter between multipart posts. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
contentLength | If given, content length for the entire multipart post. |
|
inline |
#include <http_funcs.h>
Start a multipart HTTP post using a pre-parsed URI object.
&TheUri | Reference to the pre-parsed URI object. |
separator | Separator string to use as the part delimiter between multipart posts. |
TIMEOUT_WAIT | Timeout in seconds to wait for a response. |
contentLength | If given, content length for the entire multipart post. |
bool DoUrlEncodedFormHttp | ( | HttpMethod | method, |
const char * | pUrl, | ||
char * | headers, | ||
char * | form_data, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT ) |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pUrl | Pointer to a URL string. |
bool DoUrlEncodedFormHttp | ( | HttpMethod | method, |
ParsedURI & | TheUri, | ||
char * | headers, | ||
char * | form_data, | ||
buffer_object & | result_buffer, | ||
uint16_t | TIMEOUT_WAIT ) |
#include <http_funcs.h>
Send a JSON file using a HTTP Form and a a ParsedURI object.
method | HTTP Method to use (Post, Put, or Patch) |
&TheUri | Reference to the pre-parsed URI. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
form_data | Pointer to the JSON data you are posting. |
&result_buffer | Reference to the location in which to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pUrl | Pointer to a URL string. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
|
inline |
#include <http_funcs.h>
Post a JSON file using a HTTP Form Post and a a ParsedURI object.
&TheUri | Reference to the pre-parsed URI. |
headers | Additional HTTP header fields. Multiple header fields should be concatenated together and separated by by \r\n Do not put \r\n for last header (no trailing \r\n ) |
form_data | Pointer to the JSON data you are posting. |
&result_buffer | Reference to the location in which to store the result. |
TIMEOUT_WAIT | Timeout in in system time ticks to wait for a response. |
|
inline |
#include <http_funcs.h>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
&result_string | Reference to NBString in which to store the result. |
int PopulateAuthHeader | ( | const char * | user, |
const char * | password, | ||
char * | buffer, | ||
int | maxlen ) |
#include <http_funcs.h>
Fill in a username and password into a buffer for use as an extra header.
user | Pointer to username |
password | Pointer to password |
buffer | Destination buffer to put the authenticate header in. |
maxlen | Maximum number of chars to put in buffer |
void SetHttpDiag | ( | bool | b | ) |
#include <http_funcs.h>
Enable/disable Web Client HTTP diagnostics to the console port.
b | Set true to enable, false to disable. |
void SetHttpDiag | ( | int | level | ) |
#include <http_funcs.h>
Enable/disable Web Client HTTP diagnostics to the console port.
level | Set 1 to enable, 0 to disable, or 2 for extra verbosity. |
bool StartWebClient | ( | int | prio, |
const char * | url1, | ||
const char * | url2 = NULL, | ||
bool | bDoNtp = false ) |
#include <web_client.h>
Start the web client using a URL string.
prio | Priority |
url1 | Pointer to a string representing the URL. |
url2 | Pointer to a second URL. Optional parameter, default is NULL. |
bDoNtp | Enable the Network Time Protocol (NTP). Optional parameter, default is false. |
bool StartWebClient | ( | int | prio, |
const NBString & | url1, | ||
bool | bDoNtp = false ) |
#include <web_client.h>
Start the web client using a NBString.
prio | Priority |
url1 | Reference to a NBString representing the URL. |
bDoNtp | Enable the Network Time Protocol (NTP). Optional parameter, default is false. |
#include <web_client.h>
Start the web client using a NBString.
prio | Priority |
url1 | Reference to a string representing the URL. |
url2 | Reference to a second URL. Optional parameter, default is NULL. |
bDoNtp | Enable the Network Time Protocol (NTP). Optional parameter, default is false. |