[go-nuts] Cgo fixed length array woes

2020-01-28 Thread mark mellar
Hi Folks, I'm having some trouble instantiating a C struct from a 3rd party API. I'm not sure if this is more a C question or a Go question, details in the code below, any help would be much appreciated! M // This non-compiling example demonstrates an issue I'm having integrating a 3rd party

Re: [go-nuts] Cgo fixed length array woes

2020-01-29 Thread mark mellar
January 28, 2020 at 3:21:55 PM UTC, Ian Lance Taylor wrote: > > On Tue, Jan 28, 2020 at 4:44 AM mark mellar > wrote: > > > > Hi Folks, I'm having some trouble instantiating a C struct from a 3rd > party API. > > > > I'm not sure if this is more a C

[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

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

2016-06-23 Thread mark mellar
Good tip on using httputil to inspect the request! Unfortunately I'm not seeing anything obviously wrong... Using curl -v * Trying ... * Connected to host.here.com () port 443 (#0) * TLS 1.0 connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA * Server certificate: host > GET /rest/json/flows

[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 inspe

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

2016-06-27 Thread mark mellar
t 7:12:59 AM UTC+1, ksug wrote: > > 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/

[go-nuts] SWIG-generated Go wrapper mishandling(?) pointers to pointers to structs

2020-04-17 Thread mark mellar
(Cross posting with SO https://stackoverflow.com/questions/61258160/swig-generated-go-wrapper-mishandling-pointers-to-pointers-to-structs ) Hi folks, We're integrating a Go program with a 3rd party C api, but are getting some odd results when working with pointers to pointers to structs. A mode