Liking cljdoc? Tell your friends :D

lambdaisland.uri


absolute?clj/s

Is the URI absolute? Returns true if the URI has a scheme (protocol), and hence also an origin.

Is the URI absolute? Returns true if the URI has a scheme (protocol), and hence also an origin.
sourceraw docstring

assoc-queryclj/s

(assoc-query u & {:as kvs})

Add additional query parameters to a URI. Takes a URI (or coercible to URI) followed key value pairs.

(assoc-query "http://example.com?id=1&name=John" :name "Jack" :style "goth") ;;=> #lambdaisland/uri "http://example.com?id=1&name=Jack&style=goth"

Add additional query parameters to a URI. Takes a URI (or coercible to URI)
followed key value pairs.

(assoc-query "http://example.com?id=1&name=John" :name "Jack" :style "goth")
;;=> #lambdaisland/uri "http://example.com?id=1&name=Jack&style=goth" 
sourceraw docstring

assoc-query*clj/s

(assoc-query* u m)

Add additional query parameters to a URI. Takes a URI (or coercible to URI) and a map of query params.

Add additional query parameters to a URI. Takes a URI (or coercible to URI) and
a map of query params.
sourceraw docstring

authority-regexclj/s

source

edn-readersclj/s

A map that can be passed to clojure.edn/read, so tagged URI literals are read back correctly.

A map that can be passed to clojure.edn/read, so tagged URI literals are
read back correctly.
sourceraw docstring

edn-tagclj/s

source

joinclj/s

(join & uris)

Joins any number of URIs as per RFC3986. Arguments can be strings, they will be coerced to URI records.

Joins any number of URIs as per RFC3986. Arguments can be strings, they will
be coerced to URI records.
sourceraw docstring

join*clj/s

(join* base ref)

Join two URI records as per RFC 3986. Handles relative URIs.

Join two URI records as per RFC 3986. Handles relative URIs.
sourceraw docstring

map->query-stringclj/s

(map->query-string m)

Convert a map into a query string, consisting of key=value pairs separated by &. The result is percent-encoded so it is always safe to use. Keys can be strings or keywords. If values are collections then this results in multiple entries for the same key. nil values are ignored. Values are stringified.

Convert a map into a query string, consisting of key=value pairs separated by
`&`. The result is percent-encoded so it is always safe to use. Keys can be
strings or keywords. If values are collections then this results in multiple
entries for the same key. `nil` values are ignored. Values are stringified.
sourceraw docstring

parseclj/s

(parse uri)

Parse a URI string into a lambadisland.uri.URI record.

Parse a URI string into a lambadisland.uri.URI record.
sourceraw docstring

query-encodeclj/s

(query-encode s)

Percent encoding for query strings. Will percent-encode values that are reserved in query strings only. Encodes spaces as +.

Percent encoding for query strings. Will percent-encode values that are
reserved in query strings only. Encodes spaces as +.
sourceraw docstring

query-mapclj/s

(query-map uri)
(query-map u opts)

Return the query section of a URI as a map. Will coerce its argument with uri. Takes an options map, see query-string->map for options.

Return the query section of a URI as a map. Will coerce its argument
with [[uri]]. Takes an options map, see [[query-string->map]] for options.
sourceraw docstring

query-string->mapclj/s

(query-string->map q)
(query-string->map q
                   {:keys [multikeys keywordize?]
                    :or {multikeys :duplicates keywordize? true}})

Parse a query string, consisting of key=value pairs, separated by "&". Takes the following options:

  • :keywordize? whether to turn return keys as keywords. Defaults to true.
  • :multikeys how to handle the same key occuring multiple times, defaults to :duplicates

The possible values for :multikeys are

  • :never always return a single value for a key. The rightmost value "wins"
  • :always return a map with vectors as values, with successive values of the same key in order
  • :duplicates return a vector for keys that occur multiple times, or a string otherwise
Parse a query string, consisting of key=value pairs, separated by "&". Takes
the following options:

- `:keywordize?` whether to turn return keys as keywords. Defaults to `true`.
- `:multikeys` how to handle the same key occuring multiple times, defaults to
  `:duplicates`

The possible values for `:multikeys` are

- `:never` always return a single value for a key. The rightmost value
  "wins"
- `:always` return a map with vectors as values, with successive
  values of the same key in order
- `:duplicates` return a vector for keys that occur multiple times, or a
  string otherwise
sourceraw docstring

relative?clj/s

(relative? uri)

Is the URI relative? Returns true if the URI does not have a scheme (protocol).

Is the URI relative? Returns true if the URI does not have a scheme (protocol).
sourceraw docstring

uriclj/s

(uri uri-like)

Turn the given value into a lambdaisland.uri.URI record, if it isn't one already. Supports String, java.net.URI, and other URI-like objects that return a valid URI string with str.

Turn the given value into a lambdaisland.uri.URI record, if it isn't one
already. Supports String, java.net.URI, and other URI-like objects that return
a valid URI string with `str`.
sourceraw docstring

URIclj/s

source

uri-regexclj/s

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close