clj-commons/clj-http-lite

URL encoding support

port19x opened this issue · 2 comments

clj-http automatically URL-encodes the endpoint to request.
clj-http-lite doesn't.
If it's easy enough to port that functionality, it would make replacing clj-http with clj-http-lite even more seamless for most projects that just request a few endpoints and need no advanced features only present in clj-http

@port19x Can you give an example of why this would be necessary? I've never come across this problem and I would like to learn more about the context of your problem.

Also because I'm maintaining https://github.com/babashka/http-client which may have the same problem (or not).

The idea was that in search for most plattforms, special characters get encoded.
$ shell programming -> https://www.youtube.com/results?search_query=%24+shell+programming.
I remember having had issues while porting bbyt to graalvm regarding multi word queries. At some point I made a string replace from " " to "%20" as a hack.
Now in testing I can no longer reproduce the issue I faced at the time and clj-http-lite gives the expected results without a separate encoding step