req
req copied to clipboard
Req is a batteries-included HTTP client for Elixir.
If the option `legacy_headers_as_lists` is set to `true` and running the following code will return an error ```elixir Req.get!("https://github.com/wojtekmach/req/archive/refs/tags/v0.5.5.zip", into: File.stream!("test.tar.tz")) ``` ``` ** (BadMapError) expected a map, got: []...
I was surprised this didn't work: ```elixir iex> Req.get!("https://httpbin.org/anything?x=:x", path_params: [x: 1]).body["args"] %{"x" => ":x"} ``` I mean, it makes sense, it's called _path_ params after all but still. Of...
Closes: https://github.com/wojtekmach/req/issues/422#issuecomment-2416874713
Hi Woytek, Following up on our discussion yesterday, here's a PR to start a list of related packages in the README of Req. I hope this helps people find interesting...
I've read the documentation about [transport_error/2](https://hexdocs.pm/req/Req.Test.html#transport_error/2) and maybe I'm understanding it wrong. Following the docs as closely as I can, here's my (unexpectedly) _failing_ test: ```ex test "returns the error...
Implements #395 :) Not sure if this is the best way, but I added the information I wish I'd seen yesterday and also implements a small pointer from the README....
I am doing this ```elixir Req.request(base_request(), url: "some url", method: :get) defp base_request do Req.new(retry: &maybe_retry/2, retry_delay: &retry_delay/1, max_retries: 10) end ``` and inside my `maybe_retry/2` function, when I try...
This is too confusing that depending on the presence of :nimble_csv we have or not have automatic CSV decoding. This is different from optionally depending on ezstd/brotli because if we...