lambdaisland

plexus 2020-07-18T05:32:51.148700Z

So you're building up urls from scratch? Data going into the path or into the query string?

2020-07-19T18:02:22.148800Z

Yes and in this case both. The goal is to have the url be a datastructure e.g map that we can add (path,query params) and then prior to use in a http call be converted to a url encoded string. Your lib (ty btw) seems to do all this as well. Though i need ot read the docs again to confirm that the encoding/percent-encoding happens when i join or assoc-query*. another clojurescript lib that does this is cmeriks/url.

plexus 2020-07-20T04:05:12.152800Z

assoc-query does, but doing (assoc uri :path ...) it won't, since that's just updating the field in the record. But you can assoc the path and then normalize. I wrote lambdaisland/uri as an as alternative to cemerick/url for three reasons : cross platform cljc, the ability to represent and manipulate relative urls, and an implementation of the rfc algorithm for joining urls (e.g. resolving links)

plexus 2020-07-20T10:57:50.157600Z

assoc-query came later, might be nice to add a conj-path that adds path segments and that encodes them, similar to assoc-query