My code looks something like this:
val r = :/(srv, 80) <:< Map("Cookie" -> "Scale=Scout%20Pro")
implicit val http = new Http with NoLogging
val rBeg = r / "endSessionRedirect.do"
http(rBeg <<? Map("r" -> to) >|)
It works properly, but now I need to route it through a proxy. How can I do this?
I guess it was easier that I though, it is Java underneath after all, so passing the Java proxy options works:
-Dhttp.proxyHost=localhost -Dhttp.proxyPort=8001
You can set a proxy server on the Req object directly in Dispatch 0.11 like:
val r = :/(srv, 80).setProxyServer(new ProxyServer("localhost", 8000)) <:< Map("Cookie" -> "Scale=Scout%20Pro")
Based on my testing (with v0.11.0), Dispatch completely ignores the JVM proxy options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With