15 #define ENABLE_HTTP_REQUEST_AUTH 1
23 #ifndef HTTP_MAX_HEADER_SIZE
24 #define HTTP_MAX_HEADER_SIZE (8 * 1024)
28 #ifndef HTTP_REQUEST_POOL_SIZE
29 #define HTTP_REQUEST_POOL_SIZE 20
32 #include "http-parser/http_parser.h"
43 #define XX(num, name, string) name = num,
48 #define XX(num, name, string) constexpr HttpMethod HTTP_##name = HttpMethod::name;
56 #define XX(num, name, string) name = num,
61 #define XX(num, name, string) constexpr HttpStatus HTTP_STATUS_##name = HttpStatus::name;
74 #define XX(n, s) constexpr HttpError HPE_##n = HttpError::n;
79 #define HTTP_PARSER_ERRNO(p) HttpError((p)->http_errno)
124 auto fstr =
reinterpret_cast<flash_string_t>(http_method_str(http_method(method)));
#define XX(num, name, string)
Definition: HttpCommon.h:74
HttpConnectionState
Identifies current state for an HTTP connection.
Definition: HttpCommon.h:84
@ eHCS_Sent
Definition: HttpCommon.h:90
@ eHCS_WaitResponse
Definition: HttpCommon.h:91
@ eHCS_SendingHeaders
Definition: HttpCommon.h:87
@ eHCS_StartBody
Definition: HttpCommon.h:88
@ eHCS_SendingBody
Definition: HttpCommon.h:89
@ eHCS_StartSending
Definition: HttpCommon.h:86
@ eHCS_Ready
Definition: HttpCommon.h:85
HttpMethod
Strongly-typed enum which shadows http_method from http_parser library.
Definition: HttpCommon.h:42
String toString(HttpError err)
Return a descriptive string for the given error.
String httpGetErrorDescription(HttpError err)
Return a descriptive string for the given error.
HttpStatus
HTTP status code.
Definition: HttpCommon.h:55
HttpError
HTTP error codes.
Definition: HttpCommon.h:68
String httpGetStatusText(unsigned code)
Return a descriptive string for an HTTP status code.
Definition: HttpCommon.h:114
const __FlashStringHelper * flash_string_t
Provides a strongly-typed pointer to allow safe implicit operation using String class methods.
Definition: WString.h:96
The String class.
Definition: WString.h:137