mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1506] QUESTION: How to get post data #1285
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ByronAP on GitHub (Sep 28, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1506
Hardware
WiFimanager Branch/Release: Master
Hardware: ESP32
Description
Does anyone have an example on how to get post data?
I use
wm.server->on("/saveschedule", HTTP_POST, handleSaveScheduleRoute);and
which for some reason catches both get and post... but anyway I do not see a way to access the post data, anyone have an example on how to do this?
Thank you :-)
@ByronAP commented on GitHub (Sep 29, 2022):
OK so looking at the code the answer is quite simple since WM is using the default WebServer.h thus checking for a 'plain' argument to see if raw data was sent then getting the contents of the 'plain' arg works perfectly. (using String type may cause an issue in some cases)
Example handler:
@tablatronix commented on GitHub (Sep 29, 2022):
This is really an esp webserver question