Http-Url-User

(http-url-user http-url) -> string or #f

Returns the user field of the given <http-url>.

Example:

>> (import "lib/http-url")
>> (define url (string->url "http://swdunlop@localhost/foo?bar=1#frag"))
>> url
:: [http-url "swdunlop" "localhost" 80 ("foo") [dict ("bar" . "1")] "frag"]
>> (http-url-user url)
:: "swdunlop"
>> (http-url-host url)
:: "localhost"
>> (http-url-path url)
:: ("foo")
>> (url-path url)
:: "/foo"
;; Note that the above are different; http-url-path breaks up the path into a list of names.
>> (http-url-arg url "bar")
:: "1"
>> (http-url-arg url "none")
:: #f