Skip to content

Commit 2129b85

Browse files
committed
Merge pull request #14 from shriphani/master
added docs for resolve-uri
2 parents 28fcdcf + ce0b374 commit 2129b85

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,21 @@ There are some path functions to make working with URIs easier.
166166
user> (absolute? (uri "/new/path?x=y&a=w"))
167167
false
168168

169+
#### Resolving URIs
170+
171+
`resolve-uri` allows you to resolve a partial URI against a full URI.
172+
173+
user=> (resolve-uri "http://a/b/c/d;p?q=1/2" "http://e/f")
174+
"http://e/f"
175+
user=> (resolve-uri "http://a/b/c/d;p?q=1/2" "g")
176+
"http://a/b/c/g"
177+
user=> (resolve-uri "http://a/b/c/d;p?q=1/2" "./g")
178+
"http://a/b/c/g"
179+
user=> (resolve-uri "http://a/b/c/d;p?q=1/2" "//g")
180+
"http://g"
181+
user=> (resolve-uri "http://a/b/c/d;p?q=1/2" "g?y/../x")
182+
"http://a/b/c/g?y/../x"
183+
169184
License
170185
-------
171186

0 commit comments

Comments
 (0)