Skip to content

Commit c4c946a

Browse files
lbernstoneme-no-dev
authored andcommitted
Broke HTTP_Method out into a separate library for reuse in ESPAsyncWebServer (espressif#1562)
1 parent 3967beb commit c4c946a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef_HTTP_Method_H_
2+
#define_HTTP_Method_H_
3+
4+
typedefenum{
5+
HTTP_GET=0b00000001,
6+
HTTP_POST=0b00000010,
7+
HTTP_DELETE=0b00000100,
8+
HTTP_PUT=0b00001000,
9+
HTTP_PATCH=0b00010000,
10+
HTTP_HEAD=0b00100000,
11+
HTTP_OPTIONS=0b01000000,
12+
HTTP_ANY=0b01111111,
13+
} HTTPMethod;
14+
15+
#endif/* _HTTP_Method_H_ */

‎libraries/WebServer/src/WebServer.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include<functional>
2828
#include<memory>
2929
#include<WiFi.h>
30+
#include"HTTP_Method.h"
3031

31-
enum HTTPMethod{HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
3232
enum HTTPUploadStatus{UPLOAD_FILE_START, UPLOAD_FILE_WRITE, UPLOAD_FILE_END,
3333
UPLOAD_FILE_ABORTED };
3434
enum HTTPClientStatus{HC_NONE, HC_WAIT_READ, HC_WAIT_CLOSE };

0 commit comments

Comments
(0)