This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-28
Channels
- # aleph (4)
- # announcements (5)
- # babashka (28)
- # babashka-sci-dev (13)
- # beginners (63)
- # calva (76)
- # cider (113)
- # clara (7)
- # clj-kondo (42)
- # cljdoc (1)
- # clojure (170)
- # clojure-europe (20)
- # clojure-nl (17)
- # clojure-norway (3)
- # clojure-spec (12)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (55)
- # clojureverse-ops (1)
- # consulting (1)
- # core-async (9)
- # cursive (16)
- # data-science (1)
- # datascript (8)
- # datomic (27)
- # emacs (14)
- # events (1)
- # fulcro (10)
- # graphql (9)
- # gratitude (1)
- # jobs (6)
- # jobs-discuss (5)
- # leiningen (10)
- # lsp (35)
- # missionary (4)
- # nextjournal (9)
- # off-topic (46)
- # pathom (15)
- # pedestal (5)
- # polylith (37)
- # portal (15)
- # re-frame (22)
- # reagent (4)
- # reitit (5)
- # reveal (18)
- # shadow-cljs (20)
- # tools-deps (7)
- # xtdb (10)
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})
;; => ""
?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 🙂
Just to list a few I've used over the years in no particular order: • https://github.com/lambdaisland/uri • https://github.com/cemerick/url • https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/UriBuilder.html • https://javadoc.io/doc/org.apache.httpcomponents/httpclient/latest/org/apache/http/client/utils/URIBuilder.html • https://square.github.io/okhttp/3.x/okhttp/okhttp3/HttpUrl.Builder.html • https://github.com/mikaelhg/urlbuilder