Fork me on GitHub
#reitit
<
2021-10-28
>
Pablo15:10:47

Hello everyone, Is there a function for doing this (generate URLs):

(f "localhost:8080"
   "/auth/realms/foo/protocol/openid-connect/auth"
   {:client-id :bar
    :response-type :code
    :redirect-uri ""
    :scope :openid})
;; => ""
?

Ben Sless15:10:35

you can usually find those in http client libraries, less in server libraries

eskos10:10:55

There are various URI (note I not L) builders for the JVM ecosystem, to extent the native URI class works semi decently as well and most HTTP clients have their own even, so the real answer is that you probably already have a few in your classpath, you're just not aware they're there 🙂