That yields:
DELETE /foo/bar?foo=1%26bar=2 HTTP/1.1
But expected is
DELETE /foo/bar?foo=1&bar=2 HTTP/1.1
The same for Get, Put and Post requests.
As a workaround Cro::Uri can be use:
# raku -MCro::HTTP::Client -e 'await Cro::HTTP::Client.delete(Cro::Uri.parse("http://localhost:7788/foo/bar?foo=1&bar=2"))'
OS: opensuse linux Leap 15.3
Raku: v2022.02
Cro: Cro::Core:ver<0.8.7>
Given urls to Cro::HTTP::Client will be url encoded and thus break on server side.
# netcat -l localhost 7788 &
# raku -MCro::HTTP::Client -e 'await Cro::HTTP::Client.delete("http://localhost:7788/foo/bar?foo=1&bar=2")'
That yields:
DELETE /foo/bar?foo=1%26bar=2 HTTP/1.1
But expected isDELETE /foo/bar?foo=1&bar=2 HTTP/1.1
The same for Get, Put and Post requests.
As a workaround Cro::Uri can be use:
# raku -MCro::HTTP::Client -e 'await Cro::HTTP::Client.delete(Cro::Uri.parse("http://localhost:7788/foo/bar?foo=1&bar=2"))'
OS: opensuse linux Leap 15.3 Raku: v2022.02 Cro: Cro::Core:ver<0.8.7>