Hi,
I was trying to execute the Rest Api using below code, and always get “404”,
I was verified the same API call using “Postman”, I am getting the results.
check that the url you are using is the same in go and postman (copy/paste from one to the other and confirm it still works with postman)
My best guess is there is a typo in the url. Without knowing more about the api server and how you are using Postman, the above suggestions are all I can do.
You also have two hyphens in X–API-Key, this might not be correct. Depending on how your remote service is written it may return 404 for requests without authentication.
Unable to display what exactly the error. All I get is like below
err #
I used different Golang Rest client, It does shows me the the error
actually It does redirect to another link,
I got this:
Error: Get https://n149.localdomain.com/api/v0//549236/networks: Auto redirect is disabled
Response Status Code: 302
By looking at the error found out that it redirects to another link. If “net/http” showed us first place I would not have the doubt.