Cant send response onRequestBodyfrom #9
Replies: 3 comments 1 reply
-
I can reproduce... Looking... Weird that |
Beta Was this translation helpful? Give feedback.
-
@phoenixofhp : I understand what is happening. onRequestBody and onRequestUpload are called during the request parsing phase: onBody for json post like you do for example and onUpload for file uploads. but the request processing is really done by the onRequst handler, which, in your case, is the onNotFound. It works exactly the the on(...) methods. So you need to declare the onError like this: server.onNotFound([](AsyncWebServerRequest* request) {
if (request->url() == "/game_log")
return; // response object already created by onRequestBody
request->send(404, "text/plain", "Not found");
}); I will update SimpleServer.ino. So no issue ;-) |
Beta Was this translation helpful? Give feedback.
-
Works like a charm. Thank you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Cant send response from onRequestBodyfrom
Beta Was this translation helpful? Give feedback.
All reactions