[go-nuts] Trouble querying REST API with net/http (api verified working with curl)

2016-06-23 Thread Tamás Gulácsi
Just a blind shoot into the darkness: try to use one (global) http.Client! Also, you can ask curl to dump the request, and net/http/httputil also to compare them. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group an

[go-nuts] Trouble querying REST API with net/http (api verified working with curl)

2016-06-23 Thread mark mellar
Hi folks, We have a REST API in our organisation which I'd like my Go program to query. I'm able to get the data using curl curl -c ./cookies -k -H "Content-Type: application/json" -X POST -d '{"user":"admin","password":"admin"}' "https://hostmane.here.com:443/rest/json/login"; curl -k -s -b