File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -434,6 +434,23 @@ HTTP responses other than =#{200 201 202 203 204 205 206 207 300 301 302 303
434434
435435(spacing added by me to be human readable)
436436
437+ How to use with Slingshot:
438+
439+ #+BEGIN_SRC
440+ ; Response map is thrown as exception obj.
441+ ; We filter out by status codes
442+ (try+
443+ (client/get "http://some-site.com/broken")
444+ (catch [:status 403] {:keys [request-time headers body]}
445+ (log/warn "403" request-time headers))
446+ (catch [:status 404] {:keys [request-time headers body]}
447+ (log/warn "NOT Found 404" request-time headers body))
448+ (catch Object _
449+ (log/error (:throwable &throw-context) "unexpected error")
450+ (throw+)))
451+ #+END_SRC
452+
453+
437454** Proxies
438455
439456A proxy can be specified by setting the Java properties: =<scheme>.proxyHost=
You can’t perform that action at this time.
0 commit comments