HttpCommon.h File Reference
#include "WString.h"
#include "../WebConstants.h"
#include "../Url.h"
#include "Data/Stream/ReadWriteStream.h"
#include "Data/ObjectMap.h"
#include "http-parser/http_parser.h"
Include dependency graph for HttpCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ENABLE_HTTP_REQUEST_AUTH   1
 
#define HTTP_MAX_HEADER_SIZE   (8 * 1024)
 
#define HTTP_REQUEST_POOL_SIZE   20
 

Typedefs

typedef enum http_method HttpMethod
 
typedef ObjectMap< String, ReadWriteStreamHttpFiles
 

Enumerations

enum  HttpConnectionState {
  eHCS_Ready = 0, eHCS_StartSending, eHCS_SendingHeaders, eHCS_StartBody,
  eHCS_SendingBody, eHCS_Sent
}
 

Functions

String httpGetErrorName (enum http_errno err)
 Return a string name of the given error. More...
 
String httpGetErrorDescription (enum http_errno err)
 Return a descriptive string for the given error. More...
 
String httpGetStatusText (enum http_status code)
 Return a descriptive string for an HTTP status code. More...
 
static String httpGetStatusText (unsigned code)
 Return a descriptive string for an HTTP status code. More...
 

Macro Definition Documentation

◆ ENABLE_HTTP_REQUEST_AUTH

#define ENABLE_HTTP_REQUEST_AUTH   1

◆ HTTP_MAX_HEADER_SIZE

#define HTTP_MAX_HEADER_SIZE   (8 * 1024)

◆ HTTP_REQUEST_POOL_SIZE

#define HTTP_REQUEST_POOL_SIZE   20

Typedef Documentation

◆ HttpFiles

◆ HttpMethod

typedef enum http_method HttpMethod

Enumeration Type Documentation

◆ HttpConnectionState

Enumerator
eHCS_Ready 
eHCS_StartSending 
eHCS_SendingHeaders 
eHCS_StartBody 
eHCS_SendingBody 
eHCS_Sent 

Function Documentation

◆ httpGetErrorDescription()

String httpGetErrorDescription ( enum http_errno  err)

Return a descriptive string for the given error.

Parameters
err
Return values
String

◆ httpGetErrorName()

String httpGetErrorName ( enum http_errno  err)

Return a string name of the given error.

Parameters
err
Return values
String
Note
This replaces the one in http_parser module which uses a load of RAM

◆ httpGetStatusText() [1/2]

String httpGetStatusText ( enum http_status  code)

Return a descriptive string for an HTTP status code.

Parameters
code
Return values
String

◆ httpGetStatusText() [2/2]

static String httpGetStatusText ( unsigned  code)
inlinestatic

Return a descriptive string for an HTTP status code.

Parameters
code
Return values
String