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...

Thanks for your help guys!

Mark.

On Monday, June 27, 2016 at 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/rest/json/flows
    <http://here.com:443/rest/json/flows>", nil)
    |


    On 27/06/16 08:22, mark mellar wrote:
    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 request!
        Unfortunately I'm not seeing anything obviously wrong...

        Using curl -v

        *   Trying <an-ip>...
        * Connected to host.here.com <http://host.here.com> (<an-ip>)
        port 443 (#0)
        * TLS 1.0 connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
        * Server certificate: host
        > GET /rest/json/flows HTTP/1.1
        > Host: host.here.com <http://host.here.com>
        > User-Agent: curl/7.43.0
        > Accept: */*
        > Cookie:
        
connect.sid=s%3AeQ30DeGtFyrhrntWofMWpGXo.%2F745zwxR0ErYrpnoVDklkt%2F7H9FX5GfcroBFXg5M6Ag

        > Content-Type: application/json


        using httputil.DumpRequestOut

        Get /rest/json/flows HTTP/1.1

        Host: host.here.com:443 <http://host.here.com:443>

        User-Agent: Go-http-client/1.1

        Content-Type: application/json

        Cookie:
        
connect.sid=s%3A%2FWuxV7HdAnHDweXFvs4N8%2BaB.DuNDxfVN6sLhLO%2Flu3hIY7PfUnfMquyRIfXSllGtZpM

        Accept-Encoding: gzip


        I'm suspicious about the Accept-Encoding field. I tried
        twiddling DisableCompression in my transport but nothing
        changed...

        Cheers,

        Mark

        On Friday, June 24, 2016 at 5:46:06 AM UTC+1, Tamás Gulácsi
        wrote:

            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 and stop receiving emails from it,
    send an email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com <mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to