Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c4c946a

Browse filesBrowse 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
Copy full SHA for c4c946a

File tree

2 files changed

+16
-1
lines changed
Filter options

2 files changed

+16
-1
lines changed

‎libraries/WebServer/src/HTTP_Method.h

Copy file name to clipboard
+15Lines 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+
typedef enum {
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

Copy file name to clipboardExpand all lines: libraries/WebServer/src/WebServer.h
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.