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

2016-06-27 Thread Kiki Sugiaman
Haha! Happens to the best of us every once in a while. On 28/06/16 02:57, mark mellar wrote: ksug, you were right... I was able to replicate the error using curl by changing the -x parameter from 'GET' to 'Get' . How embarrassing, I'll go sit in the corner and think about what I've done...

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

2016-06-27 Thread Kiki Sugiaman
I know this is a bit late, so perhaps you don't care anymore... Anyway, the server may not understand the "Get" method in this line: |req, err := http.NewRequest("Get", "https://"+host+".here.com:443/rest/json/flows;, nil) | On 27/06/16 08:22, mark mellar wrote: For anyone else having

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

2016-06-26 Thread mark mellar
For anyone else having similar issues, I found I was able to work around this by using client.Get() rather than client.Do(). Still not sure what the root cause is though... Cheers. On Friday, June 24, 2016 at 7:32:36 AM UTC+1, mark mellar wrote: > > Good tip on using httputil to inspect the