I have a Go server but seems I can't get a list of POST (form) parameters in my server from the POST request
I send the request from postman when the option I selected in Body tab is form-data
and the request looks like this:
POST /todo/323/item HTTP/1.1
Host: localhost:8080
Cache-Control: no-cache
Postman-Token: ef4b5606-3079-fb02-824f-f58ae89ee6f3
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="aaa"
skhdfb
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="test"
1213
------WebKitFormBoundary7MA4YWxkTrZu0gW--
I get null but when the option is x-www-form-urlencoded
it works fine. What should I do?
this is how I try to get the value:
fmt.Fprintln(w, req.FormValue("aaa"))
thanks in advance for your help