We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01f52c2 commit c917372Copy full SHA for c917372
src/clojure/http/client.clj
@@ -9,6 +9,16 @@
9
" (+http://clojure.org)"),
10
"Connection" "close"})
11
12
+(defn set-system-proxy!
13
+ "Java's HttpURLConnection cannot do per-request proxying. Instead,
14
+ system properties are used. This function mutates the global setting.
15
+ For per-request proxying, use the Apache HTTP client."
16
+ [#^String host port]
17
+ (doto (System/getProperties)
18
+ (.setProperty "http.proxyHost" host)
19
+ (.setProperty "http.proxyPort" (str port)))
20
+ nil)
21
+
22
(defn url-encode
23
"Wrapper around java.net.URLEncoder returning a (UTF-8) URL encoded
24
representation of argument, either a string or map."
0 commit comments