Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only application/x-www-form-urlencoded supported for POST request #123

Open
drewp opened this issue Sep 22, 2024 · 1 comment
Open

Only application/x-www-form-urlencoded supported for POST request #123

drewp opened this issue Sep 22, 2024 · 1 comment

Comments

@drewp
Copy link

drewp commented Sep 22, 2024

I get this from web_server upon flipping any switch on the web UI (v3):
23:11:29 [W] [web_server_idf:070] [httpd] Only application/x-www-form-urlencoded supported for POST request

That warning seems to be raised here: https://github.com/esphome/esphome/blob/dev/esphome/components/web_server_idf/web_server_idf.cpp#L69

Chrome confirms that it sent a Content-Type: text/plain;charset=UTF-8 with the turn_on request to the esp web server, so it seems like https://github.com/esphome/esphome-webserver/blob/dev/packages/v3/src/esp-entity-table.ts#L147 (if I'm looking in the right spot) should include headers: { "content-type": "application/x-www-form-urlencoded" }.

image

image

Related: esphome/esphome#6037

@RFDarter
Copy link
Contributor

strange, I never got any warning when sending Content-Type: text/plain;charset=UTF-8
I guess it only happens when using espessif-idf as the framework?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants