On Wednesday, August 12, 2015 at 12:54:10 PM UTC+1, Jay McCarthy wrote:
> 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

Hi Jay,

Thanks for that, yes I think you are right. I have just installed squid at home 
which also supports http tunnelling. I'll see how I get on and post my results 
- whether they be good or bad!

It would be really good to at least get an example on the wiki for others to 
build from, as I suspect a lot of corporate networks are behind proxies and 
this would be problematic in using Racket to make calls to REST APIs etc which 
my job at least requires a lot of.

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.

Reply via email to