NetBurner 3.5.0
PDF Version
 
http_funcs.h File Reference

JSON HTTP functions. More...

#include <nbrtos.h>
#include <nettypes.h>
#include <dns.h>
#include <webclient/web_buffers.h>

Go to the source code of this file.

Classes

class  ParsedURI
 Parsed Uniform Resource Identifier Class (URI) More...
 

Functions

void SetHttpDiag (bool b)
 Enable/disable Web Client HTTP diagnostics to the console port.
 
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)
 Send a multipart item.
 
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 DoUrlEncodedFormPost (const char *pUrl, char *headers, char *form_data, buffer_object &result_buffer, uint16_t TIMEOUT_WAIT)
 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 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)
 Post a JSON file using a HTTP POST and a ParsedURI object.
 
bool DoJsonPost (const char *pUrl, ParsedJsonDataSet &jsonout, buffer_object &result_buffer, const char *AdditionalHeaders, uint16_t TIMEOUT_WAIT=10 *TICKS_PER_SECOND)
 Post a JSON file using a HTTP POST and a URL string.
 
bool DoJsonPost (ParsedURI &TheUri, ParsedJsonDataSet &jsonout, 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 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 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 DoGet (ParsedURI &TheUri, 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 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 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.
 
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.
 

Detailed Description

JSON HTTP functions.

These Web Client functions can be used with TCP, or with TLS WEB_CLIENT_SSL_SUPPORT is enabled.