HTTP conectivity

Author(s): Daniel Cabeza.

This module implements the HTTP protocol, which allows retrieving data from HTTP servers.

Usage and interface

Documentation on exports

PREDICATE
fetch_url(URL,Request,Response)

Fetches the document pointed to by URL from Internet, using request parameters Request, and unifies Response with the parameters of the response. Fails on timeout. Note that redirections are not handled automatically, that is, if Response contains terms of the form status(redirection,301,_) and location(NewURL), the program should in most cases access location NewURL.

(True) Usage:fetch_url(URL,Request,Response)

  • The following properties should hold at call time:
    (pillow_types:url_term/1)URL specifies a URL.
    (basic_props:list/2)Request is a list of http_request_params.
  • The following properties hold upon exit:
    (basic_props:list/2)Response is a list of http_response_params.