esphome-webserver icon indicating copy to clipboard operation
esphome-webserver copied to clipboard

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

Open drewp opened this issue 5 months ago • 1 comments

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: https://github.com/esphome/esphome/pull/6037

drewp avatar Sep 22 '24 06:09 drewp