Use HTTP method table from ESP-IDF's nghttp (#4900)

Fixes: #4884

* Use HTTP method table from ESP-IDF's nghttp
* Parse methods using IDF's HTTP method list
* Make example's loops to allow the CPU to switch tasks
This commit is contained in:
Me No Dev
2021-03-05 13:40:52 +02:00
committed by GitHub
parent dd834b3372
commit f7fc8ab377
11 changed files with 32 additions and 22 deletions

View File

@ -1,15 +1,9 @@
#ifndef _HTTP_Method_H_
#define _HTTP_Method_H_
typedef enum {
HTTP_GET = 0b00000001,
HTTP_POST = 0b00000010,
HTTP_DELETE = 0b00000100,
HTTP_PUT = 0b00001000,
HTTP_PATCH = 0b00010000,
HTTP_HEAD = 0b00100000,
HTTP_OPTIONS = 0b01000000,
HTTP_ANY = 0b01111111,
} HTTPMethod;
#include "http_parser.h"
typedef enum http_method HTTPMethod;
#define HTTP_ANY (HTTPMethod)(255)
#endif /* _HTTP_Method_H_ */