1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Merge pull request #778 from CanTireInnovations/httpOptions

Adding support for OPTIONS requests to ESP8266WebServer
This commit is contained in:
Ivan Grokhotkov 2015-09-18 09:54:50 +03:00
commit 5e3fb60390
2 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,7 @@
#include <functional>
enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE };
enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
enum HTTPUploadStatus { UPLOAD_FILE_START, UPLOAD_FILE_WRITE, UPLOAD_FILE_END };
#define HTTP_DOWNLOAD_UNIT_SIZE 1460

View File

@ -59,6 +59,8 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
method = HTTP_POST;
} else if (methodStr == "DELETE") {
method = HTTP_DELETE;
} else if (methodStr == "OPTIONS") {
method = HTTP_OPTIONS;
} else if (methodStr == "PUT") {
method = HTTP_PUT;
} else if (methodStr == "PATCH") {