Skip to content

Commit c572b10

Browse files
committed
Use JsonHandlerMethods where applicable
1 parent f10342f commit c572b10

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/AsyncJson.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ constexpr static WebRequestMethodComposite JsonHandlerMethods =
118118
#if ARDUINOJSON_VERSION_MAJOR == 6
119119
AsyncCallbackJsonWebHandler::AsyncCallbackJsonWebHandler(AsyncURIMatcher uri, ArJsonRequestHandlerFunction onRequest, size_t maxJsonBufferSize)
120120
: _uri(std::move(uri)),
121-
_method(AsyncWebRequestMethod::HTTP_GET | AsyncWebRequestMethod::HTTP_POST | AsyncWebRequestMethod::HTTP_PUT | AsyncWebRequestMethod::HTTP_PATCH),
121+
_method(JsonHandlerMethods),
122122
_onRequest(onRequest), maxJsonBufferSize(maxJsonBufferSize), _maxContentLength(16384) {}
123123
#else
124124
AsyncCallbackJsonWebHandler::AsyncCallbackJsonWebHandler(AsyncURIMatcher uri, ArJsonRequestHandlerFunction onRequest)
125125
: _uri(std::move(uri)),
126-
_method(AsyncWebRequestMethod::HTTP_GET | AsyncWebRequestMethod::HTTP_POST | AsyncWebRequestMethod::HTTP_PUT | AsyncWebRequestMethod::HTTP_PATCH),
126+
_method(JsonHandlerMethods),
127127
_onRequest(onRequest), _maxContentLength(16384) {}
128128
#endif
129129

0 commit comments

Comments
 (0)