cyw43439 icon indicating copy to clipboard operation
cyw43439 copied to clipboard

HTTP POST Request

Open damongolding opened this issue 10 months ago • 3 comments

Would it be possible to implement POST requests?

My end goal would be to update Home Assistant via the REST api but they only accept POST requests when updating.

damongolding avatar Mar 27 '24 13:03 damongolding

I've added a couple of hints on how to send a POST request. Basically it requires doing the same thing as a GET but the POST has the additional feature of being able to include data after the HTTP header, which you can simply append to the header byte slice. https://github.com/soypat/cyw43439/blob/1401aecdd7441ae1c77b8fe66fb68727e5439c9d/examples/http-client/main.go#L75-L76

soypat avatar Mar 27 '24 23:03 soypat

Amazing thank you 🙏

I was able to add a auth header (I believe) but I was stuck on sending the data.

damongolding avatar Mar 28 '24 06:03 damongolding

Hey @damongolding, I believe this is solved then?

soypat avatar Apr 15 '24 15:04 soypat