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 #ifdef USE_LEGACY_HTTP_PARSER
34 #include <http-parser/http_parser.h>
42 #define XX(n, s) constexpr HttpError HPE_##n = HttpError::n;
47 #define HTTP_PARSER_ERRNO(p) HttpError((p)->http_errno)
60 return llhttp_method_name(method);
67 #define XX(num, name, ...) name,
72 #define XX(num, name, ...) constexpr HttpError HPE_##name = HttpError::name;
77 #define HTTP_PARSER_ERRNO(p) HttpError((p)->error)
90 #define XX(num, name, string) name = num,
95 #define XX(num, name, string) constexpr HttpMethod HTTP_##name = HttpMethod::name;
103 #define XX(num, name, string) name = num,
108 #define XX(num, name, string) constexpr HttpStatus HTTP_STATUS_##name = HttpStatus::name;
#define XX(num, name,...)
Definition: HttpCommon.h:108
llhttp_t http_parser
Definition: HttpCommon.h:54
HttpConnectionState
Identifies current state for an HTTP connection.
Definition: HttpCommon.h:115
@ eHCS_Sent
Definition: HttpCommon.h:121
@ eHCS_WaitResponse
Definition: HttpCommon.h:122
@ eHCS_SendingHeaders
Definition: HttpCommon.h:118
@ eHCS_StartBody
Definition: HttpCommon.h:119
@ eHCS_SendingBody
Definition: HttpCommon.h:120
@ eHCS_StartSending
Definition: HttpCommon.h:117
@ eHCS_Ready
Definition: HttpCommon.h:116
HttpMethod
Strongly-typed enum which shadows llhttp_method from llhttp library.
Definition: HttpCommon.h:89
String toString(HttpError err)
Return a descriptive string for the given error.
String httpGetErrorDescription(HttpError err)
Return a descriptive string for the given error.
llhttp_method http_method
Definition: HttpCommon.h:56
HttpStatus
HTTP status code.
Definition: HttpCommon.h:102
HttpError
HTTP error codes.
Definition: HttpCommon.h:66
llhttp_type http_parser_type
Definition: HttpCommon.h:53
llhttp_settings_t http_parser_settings
Definition: HttpCommon.h:55
String httpGetStatusText(unsigned code)
Return a descriptive string for an HTTP status code.
Definition: HttpCommon.h:146
const char * http_method_str(llhttp_method method)
Definition: HttpCommon.h:58
const __FlashStringHelper * flash_string_t
Provides a strongly-typed pointer to allow safe implicit operation using String class methods.
Definition: WString.h:92
The String class.
Definition: WString.h:133
#define SMING_DEPRECATED
Definition: sming_attr.h:37