In my Go App, I make a call to Hostname+"/translate/12345
Thing is depending the environment, in local Hostname
will be on http, and in production, it will be on https
When I test the production route on https with postman, there is no problem, route works fine.
But when I run it from WS, I get:
Get https://<mydomain.com>/translate/2327496366232: x509: certificate signed by unknown authority"
Here is my code:
var terID string
client := http.Client{}
req, err := http.NewRequest("GET", Hostname+"/translate/"+terID, nil)
if err != nil {
return "", err
}
req.SetBasicAuth(Username, Password)
res, err := client.Do(req)
if err != nil {
return "", err
}
What can I do to fix that ?