I am trying to call an API so the thing is when I am trying to call it from Postman with "Follow original HTTP method" on it's working fine but on disabling it giving a 400-Bad request response.
The same thing I am trying to do in my Go code with http client but not able to get success response. Have tried with CheckRedirect no luck there.
httpClient := http.Client{}
req, err := http.NewRequest(http.MethodPost, "url", bytes.NewBuffer(data))
if err != nil {
return "", err
}
req.Header.Set("content-type", "multipart/form-data")
resp, err := httpClient.Do(req)
if err != nil {
return "", err
}
What I can do here to get the success response on redirect? TIA