req
req copied to clipboard
`put_path_params`: Should it work with query params?
I was surprised this didn't work:
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 course we could do this instead:
iex> Req.get!("https://httpbin.org/anything", params: [x: 1]).body["args"]
%{"x" => "1"}
but with :path_params
feature we of course can get better instrumentation. I wonder if status quo is good enough or perhaps we can do some improvements?
cc @bryannaegele @whatyouhide
P.S. We're still planning to emit our own telemetry events, https://github.com/wojtekmach/req/issues/341.