uri-parse

[procedure] uri-parse str

STklos: decompose uri string and returns keyed value list.

(uri-parse "http://google.com")
    ⇒ (:scheme "http" :host "google.com" :port 80 :path "/" 
        :query "" :fragment "")
(uri-parse "http://stklos.net:8080/a/file?x=1;y=2#end")
    ⇒ (:scheme "http" :host "stklos.net" :port 8080 
        :path "/a/file" :query "x=1;y=2" :fragment "end")
(uri-parse "/a/file")           
   ⇒ (:scheme "file" :host "" :port 0 :path "/a/file" 
       :query "" :fragment "")
(uri-parse "")
   ⇒ (:scheme "file" :host "" :port 0 :path "" 
       :query "" :fragment "")

[procedure] uri-parse uri

Gauche: decompose uri string and return components in multiple values, i.e. (values scheme user-info hostname port-number path query fragment).

See also uri-scheme&specific?, uri-decompose-hierarchical?, uri-decompose-authority?, uri-compose?, uri-decode?, uri-decode-string?, uri-encode?, uri-encode-string.