manpagez: man pages & more
info bigloo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.12 URLs

bigloo procedure: url-parse url

The argument url can either be a string or an input-port. The function url-parse parses the url and returns four values:

  • the protocol,
  • the optional user info,
  • the host name,
  • the port number,
  • the absolute path

Example

(multiple-value-bind (protocol uinfo host port abspath)
   (url-parse "http://www.inria.fr/sophia/teams/indes/index.html")
   (list protocol uinfo host port abspath))
      ⇒ ("http" #f "www.inria.fr" 80 "/sophia/teams/indes/index.html'')
(multiple-value-bind (protocol uinfo host port abspath)
   (url-parse "https://foo:bar@www.inria.fr/sophia/teams/indes/index.html")
   (list protocol uinfo))
      ⇒ ("https" "foo@bar")
bigloo procedure: url-sans-protocol-parse url protocol

The argument url can either be a string or an input-port.

This function behaves as url-parse except it assumes that the protocol part of the url has already been extracted from the URI. It is explicitly provided using the protocol argument.

bigloo procedure: http-url-parse url

The argument url can either be a string or an input-port. As url-parse, it returns four values.

This function parses URL found in HTTP GET responses.

bigloo procedure: url-path-encode path

Encode a path that can be used in valid URL.

(url-path-encode "/tmp/foo") ⇒ "/tmp/foo"
(url-path-encode "/tmp/foo&bar") ⇒ "/tmp/foo%26bar"
(url-path-encode "http:///tmp/foo") ⇒ "http%3A//tmp/foo"
bigloo procedure: url-encode url
bigloo procedure: uri-encode url
bigloo procedure: uri-encode-component url

Encode a URL by removing any illegal character.

(url-encode "http:///tmp/foo") ⇒ "http://tmp:80/foo"
(url-encode "http:///tmp/foo&bar") ⇒ "http://tmp:80/foo%26"
bigloo procedure: url-decode url
bigloo procedure: url-decode! url
bigloo procedure: uri-decode url
bigloo procedure: uri-decode! url
bigloo procedure: uri-decode-component url
bigloo procedure: uri-decode-component! url

Decode a URL. The function url-decode! may return its argument unmodified if no decoding is for the URL.

The variants -component treat do not escape URI reserved characters (i.e., #, /, ?, :, @, &, =, +, and $).


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.