Comments (3)
When receiving a 503 I would expect the code to automatically retry:
(client/request {:url "https://httpbin.org/status/503"
:method :get
:retry-handler (fn [ex try-count http-context]
(println "Got:" ex)
(if (> try-count 4) false true))})
I read about the ServiceUnavailableRetryStrategy
class on a blog:
https://kevcodez.de/posts/2020-09-27-resilient-apache-http-client/
from clj-http.
I don't think we should retry on 5XX responses by default, but it would be fine to expose the ServiceUnavailableRetryStrategy
in some way also, if someone wanted to use it.
from clj-http.
On the same ship, working with some APIs that sporadically show some 503 responses for a moment, would be great to expose the ServiceUnavailableRetryStrategy
in order to allow an :unavailable-handler
or something to use this functionality
from clj-http.
Related Issues (20)
- Async HTTP Request Connection Timeout Not Work Correctly HOT 3
- The word 'officially' is spelt wrong in the GitHub description HOT 1
- HEAD requests shouldn't discard body (in the request).
- Handling of private proxies HOT 2
- Whenever I get a 405 response from a server, a null pointer exception is thrown because the connection wasn't found HOT 1
- Nested query params
- cookie-policy none
- URL encoding of whitespace should be "%20" instead of "+" in query parameters HOT 1
- Calling `.close` on response http stream will fully read stream contents rather than terminating. HOT 2
- `:query-params` are re-ordered
- :threads is mis-named and mis-documented
- multipart posts: sending name requires a mime-type
- Async requests not really async
- AOT issues with clj_http.headers.HeaderMap HOT 4
- url path parameters HOT 2
- The :redirect-strategy doesn't seem to work for PUT and PATCH HTTP methods
- option to pre-process `:query-params` HOT 2
- `with-middleware` rebinds `http/request` with new core client
- Support async with socks proxy?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clj-http.