This module implements URL encoding/decoding predicates.
url_term(http(Hostname,Port,URIStr)) :- atm(Hostname), int(Port), string(URIStr).
Usage:url_term(URL)
URL specifies a URL.
Translates a URL URL to a Prolog structure URLTerm which details its various components, and vice-versa. For now non-HTTP URLs make the predicate fail.
Usage 1:
Usage 2:
Usage 3:
Translates a relative URL URL which appears in the HTML page refered to by BaseURLTerm into URLTerm, a Prolog structure containing its absolute parameters. Absolute URLs are translated as with url_info/2. E.g.
url_info_relative("dadu.html", http('www.foo.com',80,"/bar/scoob.html"), Info)gives Info = http('www.foo.com',80,"/bar/dadu.html").
Usage 1:
Usage 2: