Wojtek Mach

Results 359 comments of Wojtek Mach

There's a bug with warnings around callbacks: ```elixir @spec foo() :: String.bad() def foo(), do: :ok ``` ``` warning: documentation references type "String.bad()" but it is undefined or private │...

Could you rebase? I can help with testing this.

Thank you, I'll do some minor updates on main.

Thank you for the report. `|` is not allowed verbatim in URLs and needs to be escaped. Req should have crashed sooner and not give invalid URL to Mint. It...

I need to find URL examples where this would be undesirable but seems URL-encoding the whole thing might work too, i.e. assume they are not encoded: ``` iex> URI.encode("https://example.com/A|B") "https://example.com/A%7CB"...

@thbar could you double-check this? Maybe Mint changed in the meantime? I can't reproduce the failure anymore: ```iex> iex> Req.get!("https://httpbin.org/anything?a[b]=1|2").body["args"] %{"a[b]" => "1|2"} ```

Sure I can add the regression test. Do you think we can close this issue then or you'd rather do some more testing in this area? Btw I cannot reproduce:...

Right, my bad. I'm able to reproduce this locally: ``` ~% elixir -e 'Mix.install([{:req, "0.4.9"}]); %{status: 200} = Req.get!("https://httpbin.org/anything?a[b]=1|2"); IO.puts("ok")' ** (Mint.HTTPError) invalid request target: "/anything?a[b]=1|2" (req 0.4.9) lib/req.ex:978: Req.request!/2...

OK, this is pretty wild. Turns out this is difference between HTTP/1.1 and HTTP/2. Req since 0.4.11 starts on HTTP/1.1 and tries to switch to HTTP/2 using ALPN and on...

Regarding API, another idea is to have it both ways: `Req.add_request_steps` _and_ `Req.Request.add_request_steps`. The former delegates to the latter.