Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2092

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - HTTP conectivity</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_145.html">previous</A>, <A HREF="ciao_147.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC604" HREF="ciao_toc.html#TOC604">HTTP conectivity</A></H1>
<P>
<A NAME="IDX6689"></A>


<P>
<STRONG>Author(s):</STRONG> Daniel Cabeza.


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.3#114 (1999/11/24, 0:57:16 MET)


<P>
This module implements the 
<A NAME="IDX6690"></A>
HTTP protocol, which allows retrieving data from HTTP servers.



<UL>
<LI><A HREF="ciao_146.html#SEC605">Usage and interface (http)</A>
<LI><A HREF="ciao_146.html#SEC606">Documentation on exports (http)</A>
</UL>



<H2><A NAME="SEC605" HREF="ciao_toc.html#TOC605">Usage and interface (<CODE>http</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(http)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX6691"></A>
<CODE>fetch_url/3</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<A NAME="IDX6692"></A>
<CODE>strings</CODE>, 
<A NAME="IDX6693"></A>
<CODE>lists</CODE>, 
<A NAME="IDX6694"></A>
<CODE>pillow/pillow_aux</CODE>, 
<A NAME="IDX6695"></A>
<CODE>pillow/pillow_types</CODE>, 
<A NAME="IDX6696"></A>
<CODE>pillow/http_ll</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC606" HREF="ciao_toc.html#TOC606">Documentation on exports (<CODE>http</CODE>)</A></H2>
<P>
<A NAME="IDX6697"></A>
<A NAME="IDX6698"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>fetch_url/3:</B>
<DD><A NAME="IDX6699"></A>


<P>
<CODE>fetch_url(URL, Request, Response)</CODE>


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


<P>
<STRONG>Usage:</STRONG> <CODE>fetch_url(URL, Request, Response)</CODE>

<UL>
<LI><EM>The following properties should hold at call time:</EM>

<CODE>URL</CODE> specifies a URL.
 (<CODE>pillow_types:url_term/1</CODE>)

<CODE>Request</CODE> is a list of <CODE>http_request_param</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
<LI><EM>The following properties hold upon exit:</EM>

<CODE>Response</CODE> is a list of <CODE>http_response_param</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_145.html">previous</A>, <A HREF="ciao_147.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>