7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="Gnome XML Library Reference Manual"
11 HREF="book1.html"><LINK
13 TITLE="Libxml Library Reference"
14 HREF="libxml-lib.html"><LINK
17 HREF="libxml-xinclude.html"><LINK
20 HREF="libxml-nanoftp.html"></HEAD
43 >Gnome XML Library Reference Manual</FONT
52 HREF="libxml-xinclude.html"
57 ><<< Previous Page</B
90 HREF="libxml-lib.html"
106 HREF="libxml-nanoftp.html"
111 >Next Page >>></B
120 NAME="LIBXML-NANOHTTP">nanohttp</H1
128 >nanohttp -- </DIV
130 CLASS="REFSYNOPSISDIV"
146 HREF="libxml-nanohttp.html#XMLNANOHTTPINIT"
150 HREF="libxml-nanohttp.html#XMLNANOHTTPCLEANUP"
151 >xmlNanoHTTPCleanup</A
154 HREF="libxml-nanohttp.html#XMLNANOHTTPSCANPROXY"
155 >xmlNanoHTTPScanProxy</A
158 HREF="libxml-nanohttp.html#XMLNANOHTTPFETCH"
161 const char *filename,
164 HREF="libxml-nanohttp.html#XMLNANOHTTPMETHOD"
165 >xmlNanoHTTPMethod</A
173 HREF="libxml-nanohttp.html#XMLNANOHTTPMETHODREDIR"
174 >xmlNanoHTTPMethodRedir</A
183 HREF="libxml-nanohttp.html#XMLNANOHTTPOPEN"
188 HREF="libxml-nanohttp.html#XMLNANOHTTPOPENREDIR"
189 >xmlNanoHTTPOpenRedir</A
194 HREF="libxml-nanohttp.html#XMLNANOHTTPRETURNCODE"
195 >xmlNanoHTTPReturnCode</A
198 HREF="libxml-nanohttp.html#XMLNANOHTTPAUTHHEADER"
199 >xmlNanoHTTPAuthHeader</A
202 HREF="libxml-nanohttp.html#XMLNANOHTTPREAD"
208 HREF="libxml-nanohttp.html#XMLNANOHTTPSAVE"
211 const char *filename);
213 HREF="libxml-nanohttp.html#XMLNANOHTTPCLOSE"
244 NAME="XMLNANOHTTPINIT"
246 >xmlNanoHTTPInit ()</H3
255 CLASS="PROGRAMLISTING"
256 >void xmlNanoHTTPInit (void);</PRE
261 >Initialize the HTTP protocol layer.
262 Currently it just checks for proxy informations</P
273 NAME="XMLNANOHTTPCLEANUP"
275 >xmlNanoHTTPCleanup ()</H3
284 CLASS="PROGRAMLISTING"
285 >void xmlNanoHTTPCleanup (void);</PRE
290 >Cleanup the HTTP protocol layer.</P
301 NAME="XMLNANOHTTPSCANPROXY"
303 >xmlNanoHTTPScanProxy ()</H3
312 CLASS="PROGRAMLISTING"
313 >void xmlNanoHTTPScanProxy (const char *URL);</PRE
318 >(Re)Initialize the HTTP Proxy context by parsing the URL and finding
319 the protocol host port it indicates.
320 Should be like http://myproxy/ or http://myproxy:3128/
321 A NULL URL cleans up proxy informations.</P
325 CLASS="INFORMALTABLE"
352 > The proxy URL used to initialize the proxy context</TD
367 NAME="XMLNANOHTTPFETCH"
369 >xmlNanoHTTPFetch ()</H3
378 CLASS="PROGRAMLISTING"
379 >int xmlNanoHTTPFetch (const char *URL,
380 const char *filename,
381 char **contentType);</PRE
386 >This function try to fetch the indicated resource via HTTP GET
387 and save it's content in the file.</P
391 CLASS="INFORMALTABLE"
418 > The URL to load</TD
435 > the filename where the content should be saved</TD
452 > if available the Content-Type information will be
453 returned at that location</TD
471 >-1 in case of failure, 0 incase of success. The contentType,
472 if provided must be freed by the caller</TD
487 NAME="XMLNANOHTTPMETHOD"
489 >xmlNanoHTTPMethod ()</H3
498 CLASS="PROGRAMLISTING"
499 >void* xmlNanoHTTPMethod (const char *URL,
509 >This function try to open a connection to the indicated resource
510 via HTTP using the given <TT
515 >, adding the given extra headers
516 and the input buffer for the request content.</P
520 CLASS="INFORMALTABLE"
547 > The URL to load</TD
564 > the HTTP method to use</TD
581 > the input string if any</TD
598 > the Content-Type information IN and OUT</TD
615 > the extra headers</TD
647 NAME="XMLNANOHTTPMETHODREDIR"
649 >xmlNanoHTTPMethodRedir ()</H3
658 CLASS="PROGRAMLISTING"
659 >void* xmlNanoHTTPMethodRedir (const char *URL,
670 >This function try to open a connection to the indicated resource
671 via HTTP using the given <TT
676 >, adding the given extra headers
677 and the input buffer for the request content.</P
681 CLASS="INFORMALTABLE"
708 > The URL to load</TD
725 > the HTTP method to use</TD
742 > the input string if any</TD
759 > the Content-Type information IN and OUT</TD
776 > the redirected URL OUT</TD
793 > the extra headers</TD
825 NAME="XMLNANOHTTPOPEN"
827 >xmlNanoHTTPOpen ()</H3
836 CLASS="PROGRAMLISTING"
837 >void* xmlNanoHTTPOpen (const char *URL,
838 char **contentType);</PRE
843 >This function try to open a connection to the indicated resource
848 CLASS="INFORMALTABLE"
875 > The URL to load</TD
892 > if available the Content-Type information will be
893 returned at that location</TD
908 NAME="XMLNANOHTTPOPENREDIR"
910 >xmlNanoHTTPOpenRedir ()</H3
919 CLASS="PROGRAMLISTING"
920 >void* xmlNanoHTTPOpenRedir (const char *URL,
927 >This function try to open a connection to the indicated resource
932 CLASS="INFORMALTABLE"
959 > The URL to load</TD
976 > if available the Content-Type information will be
977 returned at that location</TD
994 > if available the redirected URL will be returned</TD
1009 NAME="XMLNANOHTTPRETURNCODE"
1011 >xmlNanoHTTPReturnCode ()</H3
1020 CLASS="PROGRAMLISTING"
1021 >int xmlNanoHTTPReturnCode (void *ctx);</PRE
1026 >Get the latest HTTP return code received</P
1030 CLASS="INFORMALTABLE"
1057 > the HTTP context</TD
1075 >the HTTP return code for the request.</TD
1090 NAME="XMLNANOHTTPAUTHHEADER"
1092 >xmlNanoHTTPAuthHeader ()</H3
1101 CLASS="PROGRAMLISTING"
1102 >const char* xmlNanoHTTPAuthHeader (void *ctx);</PRE
1107 >Get the authentication header of an HTTP context</P
1111 CLASS="INFORMALTABLE"
1138 > the HTTP context</TD
1156 >the stashed value of the WWW-Authenticate or Proxy-Authenticate
1172 NAME="XMLNANOHTTPREAD"
1174 >xmlNanoHTTPRead ()</H3
1183 CLASS="PROGRAMLISTING"
1184 >int xmlNanoHTTPRead (void *ctx,
1191 >This function tries to read <TT
1196 > bytes from the existing HTTP connection
1197 and saves them in <TT
1202 >. This is a blocking call.</P
1206 CLASS="INFORMALTABLE"
1233 > the HTTP context</TD
1267 > the buffer length</TD
1285 >the number of byte read. 0 is an indication of an end of connection.
1286 -1 indicates a parameter error.</TD
1301 NAME="XMLNANOHTTPSAVE"
1303 >xmlNanoHTTPSave ()</H3
1312 CLASS="PROGRAMLISTING"
1313 >int xmlNanoHTTPSave (void *ctxt,
1314 const char *filename);</PRE
1319 >This function saves the output of the HTTP transaction to a file
1320 It closes and free the context at the end</P
1324 CLASS="INFORMALTABLE"
1351 > the HTTP context</TD
1368 > the filename where the content should be saved</TD
1386 >-1 in case of failure, 0 incase of success.</TD
1401 NAME="XMLNANOHTTPCLOSE"
1403 >xmlNanoHTTPClose ()</H3
1412 CLASS="PROGRAMLISTING"
1413 >void xmlNanoHTTPClose (void *ctx);</PRE
1418 >This function closes an HTTP context, it ends up the connection and
1419 free all data related to it.</P
1423 CLASS="INFORMALTABLE"
1450 > the HTTP context</TD
1462 CLEAR="all"><BR><TABLE
1474 HREF="libxml-xinclude.html"
1479 ><<< Previous Page</B
1512 HREF="libxml-lib.html"
1528 HREF="libxml-nanoftp.html"
1533 >Next Page >>></B