req
req copied to clipboard
Req is a batteries-included HTTP client for Elixir.
As descrbed in #338, a attempt for better documentation of the anonymous function usage in combination with halt. Closes #338
When using the prepend_request_steps functions in combination with Rq.Request.halt, it is quite confusing that i have to return a tuple in my step function. I think the documentation should point...
Currently the contract is `Req.request(req) :: {:ok, Req.Response.t()} | {:error, Exception.t()}`, that is, users of the library might get arbitrary exceptions. In recent releases we added a few Req exceptions:...
Just use request_steps.
I think it would be useful to have some pathway to modify the initial request before retrying in cases where failure is expected and can be rectified. Say you make...
The `Req.Steps.retry/1` docs state that the `retry-after` header is only read in case of a 429 status, while the combo of the `retry` and `retry_delay` function options does not permit...
If the function should return a delay for a _retry_, configuring `max_retries: 3` should result in 3 calls for the function only, not 4. (Actually the callback is called 2...
Hi Wojtek! This is mostly for discussion—the PR is not really ready to merge as-is for a number of reasons, but it's at least something concrete to look at. The...
Right now we special case `:headers` and `:params`. For example: ```elixir Req.new(headers: [a: 1]) |> Req.merge(headers: [b: 2]) == Req.new(headers: [a: 1, b: 2]) ``` Another one when this might...
`(Mint.TransportError) socket closed\\n (req 0.4.8) lib/req.ex:1029: Req.request!/` It's quite hard to find a repro for this bug it's frequent enough that it shows up regularly on my Oban jobs and...