Giter VIP home page Giter VIP logo

Comments (3)

jeaye avatar jeaye commented on August 16, 2024

After some digging through the code and tinkering, I've found that, even if I disable the URL encoding, this will ultimately result in Java-related URI parsing errors.

(with-redefs [clj-http.client/url-encode-illegal-characters identity]
  (:body (clj-http.client/get "https://css.gg/css?=link|bulb")))

; eval (current-form): (with-redefs [clj-http.client/url-encode-illegal-c...
; (err) Execution error (URISyntaxException) at java.net.URI$Parser/fail (URI.java:2913).
; (err) Illegal character in query at index 24: https://css.gg/css?=link|bulb

So it could be that this just can't be done with the java.net classes.

EDIT: (URL. "https://css.gg/css?=link|bulb") works fine. Just not if you try to run it through a parser.

from clj-http.

krydos avatar krydos commented on August 16, 2024

hey @jeaye
just out of curiosity, did you try to use different separator like ,

(clj-http.client/get "https://css.gg/css?=link,bulb")

this one seems like returning what's expected.

I know it's undocumented feature but I just somehow happened to find it. /, \, . seems working too btw.

from clj-http.

jeaye avatar jeaye commented on August 16, 2024

Oh, that's amazing. Thank you!

from clj-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.