I am developing a webapp using AngularJS for the frontend (still very new to JS) and Go for the backend and I am stumped trying to POST multipart/form-data
encoded data instead of URL encoded. I have tried to google it, but I cannot seem to find an example that doesn't assume that I'm only trying to upload a file. I am simply trying to POST a simple form with some text fields and no files.
I can get it work by bypassing Angular with a simple html form using method="POST"
, but it is surprisingly difficult to do in javascript.
On the server side, I am decoding the POST request with http.Request.FormValue("key")
.
Could someone point me in the right direction? Cheers!