On Tue, Aug 11, 2015 at 10:24 AM, Sean Kemplay <sean.kemp...@gmail.com> wrote:
> Hi All,
>
> Sending an http request through our corporate proxy works as follows for http 
> requests ->
>
> (define-values (x y z)
>   (http-sendrecv "10.0.0.200" "http://www.example.com";
>                  #:port 8080
>                  #:headers '(
>                                          "Proxy-Authorization: Basic 
> base64encodedcredentials"
>                                          "Proxy-Connections: keep-alive"
>                                          )
>                  #:ssl? #f
>                  #:method "GET"))
>
> However fails for HTTPS requests (as expected).
>
> What I need to do is make a request like the above using the #:method 
> "CONNECT" and then make a secondary request through a returned connection.
>
> Does anyone know how I would go about doing that in Racket?

http-sendrecv combines calls to http-conn-open, http-conn-send!,
http-conn-recv!, then http-conn-close!. I suspect that you just need
to break up that one big call into a few calls like open, send, recv,
send, recv, close. I'd be happy to work on it with you, but I don't
have such a proxy on hand, so I'll need helping testing it.

Jay

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



-- 
Jay McCarthy
http://jeapostrophe.github.io

           "Wherefore, be not weary in well-doing,
      for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
                          - D&C 64:33

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

Reply via email to