| Author |
Setting a proxy
|
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
|
I was trying to use parse-seq from clojure.contrib.lazy-xml but got a "java.net.SocketException: Connection reset". I guess it's because of the proxy. Is there a file where I can set the proxy ? If yes, which and how ?
|
[My Blog]
All roads lead to JavaRanch
|
 |
Chris Houser
author
Greenhorn
Joined: Feb 07, 2011
Posts: 22
|
|
This is really a Java question and is answered thoroughly in the official documentation.
To set the HTTP proxy from within a Clojure program, you could use this:
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
|
I see. I was expecting something like a properties file where it could be set, so that I don't need to do it all the time. Like in Maven where I put the proxy setting in settings.xml. Is user.clj the right place ?
|
 |
Chris Houser
author
Greenhorn
Joined: Feb 07, 2011
Posts: 22
|
|
|
If it works for Java, there's a very good chance it'll work for Clojure. Have you tried using settings.xml?
|
 |
 |
|
|
subject: Setting a proxy
|
|
|