File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ More example requests:
7575 :body " {\" json\" : \" input\" }"
7676 :headers {" X-Api-Version" " 2" }
7777 :content-type :json
78- :socket-timeout 1000
79- :conn-timeout 1000
78+ :socket-timeout 1000 ; ; in milliseconds
79+ :conn-timeout 1000 ; ; in milliseconds
8080 :accept :json })
8181
8282; ; Specifying headers as either a string or collection:
@@ -101,6 +101,10 @@ More example requests:
101101; ; Throw an exception if redirected too many times:
102102(client/get " http://site.come/redirects-somewhere" {:max-redirects 5 :throw-exceptions true })
103103
104+ ; ; Throw an exception if the get takes too long. Timeouts in milliseconds.
105+ (client/get " http://site.come/redirects-somewhere" {:socket-timeout 1000 :conn-timeout 1000 })
106+
107+
104108; ; Send form params as a urlencoded body (POST or PUT)
105109(client/post " http//site.com" {:form-params {:foo " bar" }})
106110; ; Send form params as a json encoded body (POST or PUT)
Original file line number Diff line number Diff line change 171171 Note that where Ring uses InputStreams for the request and response bodies,
172172 the clj-http uses ByteArrays for the bodies."
173173 [{:keys [request-method scheme server-name server-port uri query-string
174- headers body socket-timeout conn-timeout multipart debug debug-body
174+ headers body multipart debug debug-body
175+ socket-timeout conn-timeout ; ; in milliseconds
175176 insecure? save-request? proxy-host proxy-port as cookie-store
176177 retry-handler response-interceptor digest-auth connection-manager
177178 client-params] :as req}]
You can’t perform that action at this time.
0 commit comments