Hello, I am trying to take form data submitted to a route on my website and forward it to another route.
So from my understanding there are two ways to submit form data of r.Values
but I cannot set the headers so I am not using this, and
My question is, do I have to consider anything when sending r.Form (r.Values) from one route to another?
resp, err := http.PostForm(“http://localhost:3000/post”, r.Form)
req, err := http.NewRequest(“POST”, “http://localhost:3000/post”, strings.NewReader(r.Form.Encode))
req, err := http.NewRequest(“POST”, “http://localhost:3000/post”, r.Body)
req, err := http.Post(“http://localhost:3000/post”, “multipart/form-data”, r.Body)
non of these once it gets the http://localhost:3000/post retains any of the form or body data
Would anyone know how to correctly send formdata/values from one route to a next?
Any help would be appreciated.