blob: 7cb66a01bb24be51a66a9f71affaaccb98b41429 [file] [log] [blame]
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001<HTML
2><HEAD
3><TITLE
4>nanohttp</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillardf3a73582000-01-05 14:58:39 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
Daniel Veillard7c1206f1999-10-14 09:10:25 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
Daniel Veillard35008381999-10-25 13:15:52 +000012TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
Daniel Veillard7c1206f1999-10-14 09:10:25 +000014REL="PREVIOUS"
Daniel Veillard35008381999-10-25 13:15:52 +000015TITLE="xpath"
16HREF="gnome-xml-xpath.html"><LINK
17REL="NEXT"
Daniel Veillardaeea04f2000-01-25 19:27:27 +000018TITLE="nanoftp"
19HREF="gnome-xml-nanoftp.html"></HEAD
Daniel Veillard7c1206f1999-10-14 09:10:25 +000020><BODY
21BGCOLOR="#FFFFFF"
22TEXT="#000000"
23><DIV
24CLASS="NAVHEADER"
25><TABLE
26WIDTH="100%"
27BORDER="0"
28BGCOLOR="#000000"
29CELLPADDING="1"
30CELLSPACING="0"
31><TR
32><TH
33COLSPAN="4"
34ALIGN="center"
35><FONT
36COLOR="#FFFFFF"
37SIZE="5"
38>Gnome XML Library Reference Manual</FONT
39></TH
40></TR
41><TR
42><TD
43WIDTH="25%"
44BGCOLOR="#C00000"
45ALIGN="left"
46><A
Daniel Veillard35008381999-10-25 13:15:52 +000047HREF="gnome-xml-xpath.html"
Daniel Veillard7c1206f1999-10-14 09:10:25 +000048><FONT
49COLOR="#FFFFFF"
50SIZE="3"
51><B
52>&#60;&#60;&#60; Previous Page</B
53></FONT
54></A
55></TD
56><TD
57WIDTH="25%"
58BGCOLOR="#0000C0"
59ALIGN="center"
60><FONT
61COLOR="#FFFFFF"
62SIZE="3"
63><B
64><A
65HREF="book1.html"
66><FONT
67COLOR="#FFFFFF"
68SIZE="3"
69><B
70>Home</B
71></FONT
72></A
73></B
74></FONT
75></TD
76><TD
77WIDTH="25%"
78BGCOLOR="#00C000"
79ALIGN="center"
80><FONT
81COLOR="#FFFFFF"
82SIZE="3"
83><B
84><A
Daniel Veillard35008381999-10-25 13:15:52 +000085HREF="libxml-lib.html"
Daniel Veillard7c1206f1999-10-14 09:10:25 +000086><FONT
87COLOR="#FFFFFF"
88SIZE="3"
89><B
90>Up</B
91></FONT
92></A
93></B
94></FONT
95></TD
96><TD
97WIDTH="25%"
98BGCOLOR="#C00000"
99ALIGN="right"
Daniel Veillard35008381999-10-25 13:15:52 +0000100><A
Daniel Veillardaeea04f2000-01-25 19:27:27 +0000101HREF="gnome-xml-nanoftp.html"
Daniel Veillard35008381999-10-25 13:15:52 +0000102><FONT
103COLOR="#FFFFFF"
104SIZE="3"
105><B
106>Next Page &#62;&#62;&#62;</B
107></FONT
108></A
109></TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000110></TR
111></TABLE
112></DIV
113><H1
Daniel Veillardf3a73582000-01-05 14:58:39 +0000114>nanohttp</H1
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000115><DIV
116CLASS="REFNAMEDIV"
117><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000118NAME="AEN9654"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000119></A
120><H2
121>Name</H2
Daniel Veillardf3a73582000-01-05 14:58:39 +0000122>nanohttp &#8212; </DIV
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000123><DIV
124CLASS="REFSYNOPSISDIV"
125><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000126NAME="AEN9657"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000127></A
128><H2
129>Synopsis</H2
130><TABLE
131BORDER="0"
132BGCOLOR="#D6E8FF"
133WIDTH="100%"
134CELLPADDING="6"
135><TR
136><TD
137><PRE
138CLASS="SYNOPSIS"
139>&#13;
140
Daniel Veillarde41f2b72000-01-30 20:00:07 +0000141void <A
142HREF="gnome-xml-nanohttp.html#XMLNANOHTTPINIT"
143>xmlNanoHTTPInit</A
144> (void);
145void <A
146HREF="gnome-xml-nanohttp.html#XMLNANOHTTPCLEANUP"
147>xmlNanoHTTPCleanup</A
148> (void);
149void <A
150HREF="gnome-xml-nanohttp.html#XMLNANOHTTPSCANPROXY"
151>xmlNanoHTTPScanProxy</A
152> (const char *URL);
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000153int <A
154HREF="gnome-xml-nanohttp.html#XMLNANOHTTPFETCH"
155>xmlNanoHTTPFetch</A
156> (const char *URL,
Daniel Veillard35008381999-10-25 13:15:52 +0000157 const char *filename,
158 char **contentType);
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000159void* <A
160HREF="gnome-xml-nanohttp.html#XMLNANOHTTPMETHOD"
161>xmlNanoHTTPMethod</A
162> (const char *URL,
163 const char *method,
164 const char *input,
165 char **contentType,
166 const char *headers);
167void* <A
168HREF="gnome-xml-nanohttp.html#XMLNANOHTTPOPEN"
169>xmlNanoHTTPOpen</A
170> (const char *URL,
171 char **contentType);
172int <A
173HREF="gnome-xml-nanohttp.html#XMLNANOHTTPRETURNCODE"
174>xmlNanoHTTPReturnCode</A
175> (void *ctx);
176int <A
177HREF="gnome-xml-nanohttp.html#XMLNANOHTTPREAD"
178>xmlNanoHTTPRead</A
179> (void *ctx,
180 void *dest,
181 int len);
182int <A
183HREF="gnome-xml-nanohttp.html#XMLNANOHTTPSAVE"
184>xmlNanoHTTPSave</A
185> (void *ctxt,
186 const char *filename);
187void <A
188HREF="gnome-xml-nanohttp.html#XMLNANOHTTPCLOSE"
189>xmlNanoHTTPClose</A
190> (void *ctx);</PRE
191></TD
192></TR
193></TABLE
194></DIV
195><DIV
196CLASS="REFSECT1"
197><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000198NAME="AEN9670"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000199></A
200><H2
201>Description</H2
202><P
203></P
204></DIV
205><DIV
206CLASS="REFSECT1"
207><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000208NAME="AEN9673"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000209></A
210><H2
211>Details</H2
212><DIV
213CLASS="REFSECT2"
214><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000215NAME="AEN9675"
Daniel Veillarde41f2b72000-01-30 20:00:07 +0000216></A
217><H3
218><A
219NAME="XMLNANOHTTPINIT"
220></A
221>xmlNanoHTTPInit ()</H3
222><TABLE
223BORDER="0"
224BGCOLOR="#D6E8FF"
225WIDTH="100%"
226CELLPADDING="6"
227><TR
228><TD
229><PRE
230CLASS="PROGRAMLISTING"
231>void xmlNanoHTTPInit (void);</PRE
232></TD
233></TR
234></TABLE
235><P
236>Initialize the HTTP protocol layer.
237Currently it just checks for proxy informations</P
238><P
239></P
240></DIV
241><HR><DIV
242CLASS="REFSECT2"
243><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000244NAME="AEN9681"
Daniel Veillarde41f2b72000-01-30 20:00:07 +0000245></A
246><H3
247><A
248NAME="XMLNANOHTTPCLEANUP"
249></A
250>xmlNanoHTTPCleanup ()</H3
251><TABLE
252BORDER="0"
253BGCOLOR="#D6E8FF"
254WIDTH="100%"
255CELLPADDING="6"
256><TR
257><TD
258><PRE
259CLASS="PROGRAMLISTING"
260>void xmlNanoHTTPCleanup (void);</PRE
261></TD
262></TR
263></TABLE
264><P
265></P
266></DIV
267><HR><DIV
268CLASS="REFSECT2"
269><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000270NAME="AEN9686"
Daniel Veillarde41f2b72000-01-30 20:00:07 +0000271></A
272><H3
273><A
274NAME="XMLNANOHTTPSCANPROXY"
275></A
276>xmlNanoHTTPScanProxy ()</H3
277><TABLE
278BORDER="0"
279BGCOLOR="#D6E8FF"
280WIDTH="100%"
281CELLPADDING="6"
282><TR
283><TD
284><PRE
285CLASS="PROGRAMLISTING"
286>void xmlNanoHTTPScanProxy (const char *URL);</PRE
287></TD
288></TR
289></TABLE
290><P
291>(Re)Initialize the HTTP Proxy context by parsing the URL and finding
292the protocol host port it indicates.
293Should be like http://myproxy/ or http://myproxy:3128/
294A NULL URL cleans up proxy informations.</P
295><P
296></P
297><DIV
298CLASS="INFORMALTABLE"
299><P
300></P
301><TABLE
302BORDER="0"
303WIDTH="100%"
304BGCOLOR="#FFD0D0"
305CELLSPACING="0"
306CELLPADDING="4"
307CLASS="CALSTABLE"
308><TR
309><TD
310WIDTH="20%"
311ALIGN="RIGHT"
312VALIGN="TOP"
313><TT
314CLASS="PARAMETER"
315><I
316>URL</I
317></TT
318>&nbsp;:</TD
319><TD
320WIDTH="80%"
321ALIGN="LEFT"
322VALIGN="TOP"
323> The proxy URL used to initialize the proxy context</TD
324></TR
325></TABLE
326><P
327></P
328></DIV
329></DIV
330><HR><DIV
331CLASS="REFSECT2"
332><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000333NAME="AEN9701"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000334></A
335><H3
336><A
337NAME="XMLNANOHTTPFETCH"
338></A
339>xmlNanoHTTPFetch ()</H3
340><TABLE
341BORDER="0"
342BGCOLOR="#D6E8FF"
343WIDTH="100%"
344CELLPADDING="6"
345><TR
346><TD
347><PRE
348CLASS="PROGRAMLISTING"
349>int xmlNanoHTTPFetch (const char *URL,
Daniel Veillard35008381999-10-25 13:15:52 +0000350 const char *filename,
351 char **contentType);</PRE
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000352></TD
353></TR
354></TABLE
355><P
356>This function try to fetch the indicated resource via HTTP GET
357and save it's content in the file.</P
358><P
359></P
360><DIV
361CLASS="INFORMALTABLE"
362><P
363></P
364><TABLE
365BORDER="0"
366WIDTH="100%"
367BGCOLOR="#FFD0D0"
368CELLSPACING="0"
369CELLPADDING="4"
370CLASS="CALSTABLE"
371><TR
372><TD
373WIDTH="20%"
374ALIGN="RIGHT"
375VALIGN="TOP"
376><TT
377CLASS="PARAMETER"
378><I
379>URL</I
380></TT
381>&nbsp;:</TD
382><TD
383WIDTH="80%"
384ALIGN="LEFT"
385VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000386> The URL to load</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000387></TR
388><TR
389><TD
390WIDTH="20%"
391ALIGN="RIGHT"
392VALIGN="TOP"
393><TT
394CLASS="PARAMETER"
395><I
396>filename</I
397></TT
398>&nbsp;:</TD
399><TD
400WIDTH="80%"
401ALIGN="LEFT"
402VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000403> the filename where the content should be saved</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000404></TR
405><TR
406><TD
407WIDTH="20%"
408ALIGN="RIGHT"
409VALIGN="TOP"
Daniel Veillard35008381999-10-25 13:15:52 +0000410><TT
411CLASS="PARAMETER"
412><I
413>contentType</I
414></TT
415>&nbsp;:</TD
416><TD
417WIDTH="80%"
418ALIGN="LEFT"
419VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000420> if available the Content-Type information will be
421returned at that location</TD
Daniel Veillard35008381999-10-25 13:15:52 +0000422></TR
423><TR
424><TD
425WIDTH="20%"
426ALIGN="RIGHT"
427VALIGN="TOP"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000428><I
429CLASS="EMPHASIS"
430>Returns</I
431> :</TD
432><TD
433WIDTH="80%"
434ALIGN="LEFT"
435VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000436>-1 in case of failure, 0 incase of success. The contentType,
437if provided must be freed by the caller</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000438></TR
439></TABLE
440><P
441></P
442></DIV
443></DIV
444><HR><DIV
445CLASS="REFSECT2"
446><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000447NAME="AEN9728"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000448></A
449><H3
450><A
451NAME="XMLNANOHTTPMETHOD"
452></A
453>xmlNanoHTTPMethod ()</H3
454><TABLE
455BORDER="0"
456BGCOLOR="#D6E8FF"
457WIDTH="100%"
458CELLPADDING="6"
459><TR
460><TD
461><PRE
462CLASS="PROGRAMLISTING"
463>void* xmlNanoHTTPMethod (const char *URL,
464 const char *method,
465 const char *input,
466 char **contentType,
467 const char *headers);</PRE
468></TD
469></TR
470></TABLE
471><P
472>This function try to open a connection to the indicated resource
473via HTTP using the given <TT
474CLASS="PARAMETER"
475><I
476>method</I
477></TT
478>, adding the given extra headers
479and the input buffer for the request content.</P
480><P
481></P
482><DIV
483CLASS="INFORMALTABLE"
484><P
485></P
486><TABLE
487BORDER="0"
488WIDTH="100%"
489BGCOLOR="#FFD0D0"
490CELLSPACING="0"
491CELLPADDING="4"
492CLASS="CALSTABLE"
493><TR
494><TD
495WIDTH="20%"
496ALIGN="RIGHT"
497VALIGN="TOP"
498><TT
499CLASS="PARAMETER"
500><I
501>URL</I
502></TT
503>&nbsp;:</TD
504><TD
505WIDTH="80%"
506ALIGN="LEFT"
507VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000508> The URL to load</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000509></TR
510><TR
511><TD
512WIDTH="20%"
513ALIGN="RIGHT"
514VALIGN="TOP"
515><TT
516CLASS="PARAMETER"
517><I
518>method</I
519></TT
520>&nbsp;:</TD
521><TD
522WIDTH="80%"
523ALIGN="LEFT"
524VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000525> the HTTP method to use</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000526></TR
527><TR
528><TD
529WIDTH="20%"
530ALIGN="RIGHT"
531VALIGN="TOP"
532><TT
533CLASS="PARAMETER"
534><I
535>input</I
536></TT
537>&nbsp;:</TD
538><TD
539WIDTH="80%"
540ALIGN="LEFT"
541VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000542> the input string if any</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000543></TR
544><TR
545><TD
546WIDTH="20%"
547ALIGN="RIGHT"
548VALIGN="TOP"
549><TT
550CLASS="PARAMETER"
551><I
552>contentType</I
553></TT
554>&nbsp;:</TD
555><TD
556WIDTH="80%"
557ALIGN="LEFT"
558VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000559> the Content-Type information IN and OUT</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000560></TR
561><TR
562><TD
563WIDTH="20%"
564ALIGN="RIGHT"
565VALIGN="TOP"
566><TT
567CLASS="PARAMETER"
568><I
569>headers</I
570></TT
571>&nbsp;:</TD
572><TD
573WIDTH="80%"
574ALIGN="LEFT"
575VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000576> the extra headers</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000577></TR
578></TABLE
579><P
580></P
581></DIV
582></DIV
583><HR><DIV
584CLASS="REFSECT2"
585><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000586NAME="AEN9760"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000587></A
588><H3
589><A
590NAME="XMLNANOHTTPOPEN"
591></A
592>xmlNanoHTTPOpen ()</H3
593><TABLE
594BORDER="0"
595BGCOLOR="#D6E8FF"
596WIDTH="100%"
597CELLPADDING="6"
598><TR
599><TD
600><PRE
601CLASS="PROGRAMLISTING"
602>void* xmlNanoHTTPOpen (const char *URL,
603 char **contentType);</PRE
604></TD
605></TR
606></TABLE
607><P
608>This function try to open a connection to the indicated resource
609via HTTP GET.</P
610><P
611></P
612><DIV
613CLASS="INFORMALTABLE"
614><P
615></P
616><TABLE
617BORDER="0"
618WIDTH="100%"
619BGCOLOR="#FFD0D0"
620CELLSPACING="0"
621CELLPADDING="4"
622CLASS="CALSTABLE"
623><TR
624><TD
625WIDTH="20%"
626ALIGN="RIGHT"
627VALIGN="TOP"
628><TT
629CLASS="PARAMETER"
630><I
631>URL</I
632></TT
633>&nbsp;:</TD
634><TD
635WIDTH="80%"
636ALIGN="LEFT"
637VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000638> The URL to load</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000639></TR
640><TR
641><TD
642WIDTH="20%"
643ALIGN="RIGHT"
644VALIGN="TOP"
645><TT
646CLASS="PARAMETER"
647><I
648>contentType</I
649></TT
650>&nbsp;:</TD
651><TD
652WIDTH="80%"
653ALIGN="LEFT"
654VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000655> if available the Content-Type information will be
656returned at that location</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000657></TR
658></TABLE
659><P
660></P
661></DIV
662></DIV
663><HR><DIV
664CLASS="REFSECT2"
665><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000666NAME="AEN9779"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000667></A
668><H3
669><A
670NAME="XMLNANOHTTPRETURNCODE"
671></A
672>xmlNanoHTTPReturnCode ()</H3
673><TABLE
674BORDER="0"
675BGCOLOR="#D6E8FF"
676WIDTH="100%"
677CELLPADDING="6"
678><TR
679><TD
680><PRE
681CLASS="PROGRAMLISTING"
682>int xmlNanoHTTPReturnCode (void *ctx);</PRE
683></TD
684></TR
685></TABLE
686><P
687></P
688><P
689></P
690><DIV
691CLASS="INFORMALTABLE"
692><P
693></P
694><TABLE
695BORDER="0"
696WIDTH="100%"
697BGCOLOR="#FFD0D0"
698CELLSPACING="0"
699CELLPADDING="4"
700CLASS="CALSTABLE"
701><TR
702><TD
703WIDTH="20%"
704ALIGN="RIGHT"
705VALIGN="TOP"
706><TT
707CLASS="PARAMETER"
708><I
709>ctx</I
710></TT
711>&nbsp;:</TD
712><TD
713WIDTH="80%"
714ALIGN="LEFT"
715VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000716> the HTTP context</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000717></TR
718><TR
719><TD
720WIDTH="20%"
721ALIGN="RIGHT"
722VALIGN="TOP"
723><I
724CLASS="EMPHASIS"
725>Returns</I
726> :</TD
727><TD
728WIDTH="80%"
729ALIGN="LEFT"
730VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000731>the HTTP return code for the request.</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000732></TR
733></TABLE
734><P
735></P
736></DIV
737></DIV
738><HR><DIV
739CLASS="REFSECT2"
740><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000741NAME="AEN9798"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000742></A
743><H3
744><A
745NAME="XMLNANOHTTPREAD"
746></A
747>xmlNanoHTTPRead ()</H3
748><TABLE
749BORDER="0"
750BGCOLOR="#D6E8FF"
751WIDTH="100%"
752CELLPADDING="6"
753><TR
754><TD
755><PRE
756CLASS="PROGRAMLISTING"
757>int xmlNanoHTTPRead (void *ctx,
758 void *dest,
759 int len);</PRE
760></TD
761></TR
762></TABLE
763><P
764>This function tries to read <TT
765CLASS="PARAMETER"
766><I
767>len</I
768></TT
769> bytes from the existing HTTP connection
770and saves them in <TT
771CLASS="PARAMETER"
772><I
773>dest</I
774></TT
775>. This is a blocking call.</P
776><P
777></P
778><DIV
779CLASS="INFORMALTABLE"
780><P
781></P
782><TABLE
783BORDER="0"
784WIDTH="100%"
785BGCOLOR="#FFD0D0"
786CELLSPACING="0"
787CELLPADDING="4"
788CLASS="CALSTABLE"
789><TR
790><TD
791WIDTH="20%"
792ALIGN="RIGHT"
793VALIGN="TOP"
794><TT
795CLASS="PARAMETER"
796><I
797>ctx</I
798></TT
799>&nbsp;:</TD
800><TD
801WIDTH="80%"
802ALIGN="LEFT"
803VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000804> the HTTP context</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000805></TR
806><TR
807><TD
808WIDTH="20%"
809ALIGN="RIGHT"
810VALIGN="TOP"
811><TT
812CLASS="PARAMETER"
813><I
814>dest</I
815></TT
816>&nbsp;:</TD
817><TD
818WIDTH="80%"
819ALIGN="LEFT"
820VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000821> a buffer</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000822></TR
823><TR
824><TD
825WIDTH="20%"
826ALIGN="RIGHT"
827VALIGN="TOP"
828><TT
829CLASS="PARAMETER"
830><I
831>len</I
832></TT
833>&nbsp;:</TD
834><TD
835WIDTH="80%"
836ALIGN="LEFT"
837VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000838> the buffer length</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000839></TR
840><TR
841><TD
842WIDTH="20%"
843ALIGN="RIGHT"
844VALIGN="TOP"
845><I
846CLASS="EMPHASIS"
847>Returns</I
848> :</TD
849><TD
850WIDTH="80%"
851ALIGN="LEFT"
852VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000853>the number of byte read. 0 is an indication of an end of connection.
854-1 indicates a parameter error.</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000855></TR
856></TABLE
857><P
858></P
859></DIV
860></DIV
861><HR><DIV
862CLASS="REFSECT2"
863><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000864NAME="AEN9827"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000865></A
866><H3
867><A
868NAME="XMLNANOHTTPSAVE"
869></A
870>xmlNanoHTTPSave ()</H3
871><TABLE
872BORDER="0"
873BGCOLOR="#D6E8FF"
874WIDTH="100%"
875CELLPADDING="6"
876><TR
877><TD
878><PRE
879CLASS="PROGRAMLISTING"
880>int xmlNanoHTTPSave (void *ctxt,
881 const char *filename);</PRE
882></TD
883></TR
884></TABLE
885><P
886>This function saves the output of the HTTP transaction to a file
887It closes and free the context at the end</P
888><P
889></P
890><DIV
891CLASS="INFORMALTABLE"
892><P
893></P
894><TABLE
895BORDER="0"
896WIDTH="100%"
897BGCOLOR="#FFD0D0"
898CELLSPACING="0"
899CELLPADDING="4"
900CLASS="CALSTABLE"
901><TR
902><TD
903WIDTH="20%"
904ALIGN="RIGHT"
905VALIGN="TOP"
906><TT
907CLASS="PARAMETER"
908><I
909>ctxt</I
910></TT
911>&nbsp;:</TD
912><TD
913WIDTH="80%"
914ALIGN="LEFT"
915VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000916> the HTTP context</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000917></TR
918><TR
919><TD
920WIDTH="20%"
921ALIGN="RIGHT"
922VALIGN="TOP"
923><TT
924CLASS="PARAMETER"
925><I
926>filename</I
927></TT
928>&nbsp;:</TD
929><TD
930WIDTH="80%"
931ALIGN="LEFT"
932VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000933> the filename where the content should be saved</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000934></TR
935><TR
936><TD
937WIDTH="20%"
938ALIGN="RIGHT"
939VALIGN="TOP"
940><I
941CLASS="EMPHASIS"
942>Returns</I
943> :</TD
944><TD
945WIDTH="80%"
946ALIGN="LEFT"
947VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +0000948>-1 in case of failure, 0 incase of success.</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000949></TR
950></TABLE
951><P
952></P
953></DIV
954></DIV
955><HR><DIV
956CLASS="REFSECT2"
957><A
Daniel Veillardedfb29b2000-03-14 19:59:05 +0000958NAME="AEN9850"
Daniel Veillard7c1206f1999-10-14 09:10:25 +0000959></A
960><H3
961><A
962NAME="XMLNANOHTTPCLOSE"
963></A
964>xmlNanoHTTPClose ()</H3
965><TABLE
966BORDER="0"
967BGCOLOR="#D6E8FF"
968WIDTH="100%"
969CELLPADDING="6"
970><TR
971><TD
972><PRE
973CLASS="PROGRAMLISTING"
974>void xmlNanoHTTPClose (void *ctx);</PRE
975></TD
976></TR
977></TABLE
978><P
979>This function closes an HTTP context, it ends up the connection and
980free all data related to it.</P
981><P
982></P
983><DIV
984CLASS="INFORMALTABLE"
985><P
986></P
987><TABLE
988BORDER="0"
989WIDTH="100%"
990BGCOLOR="#FFD0D0"
991CELLSPACING="0"
992CELLPADDING="4"
993CLASS="CALSTABLE"
994><TR
995><TD
996WIDTH="20%"
997ALIGN="RIGHT"
998VALIGN="TOP"
999><TT
1000CLASS="PARAMETER"
1001><I
1002>ctx</I
1003></TT
1004>&nbsp;:</TD
1005><TD
1006WIDTH="80%"
1007ALIGN="LEFT"
1008VALIGN="TOP"
Daniel Veillardf3a73582000-01-05 14:58:39 +00001009> the HTTP context</TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001010></TR
1011></TABLE
1012><P
1013></P
1014></DIV
1015></DIV
1016></DIV
1017><DIV
1018CLASS="NAVFOOTER"
1019><BR
1020CLEAR="all"><BR><TABLE
1021WIDTH="100%"
1022BORDER="0"
1023BGCOLOR="#000000"
1024CELLPADDING="1"
1025CELLSPACING="0"
1026><TR
1027><TD
1028WIDTH="25%"
1029BGCOLOR="#C00000"
1030ALIGN="left"
1031><A
Daniel Veillard35008381999-10-25 13:15:52 +00001032HREF="gnome-xml-xpath.html"
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001033><FONT
1034COLOR="#FFFFFF"
1035SIZE="3"
1036><B
1037>&#60;&#60;&#60; Previous Page</B
1038></FONT
1039></A
1040></TD
1041><TD
1042WIDTH="25%"
1043BGCOLOR="#0000C0"
1044ALIGN="center"
1045><FONT
1046COLOR="#FFFFFF"
1047SIZE="3"
1048><B
1049><A
1050HREF="book1.html"
1051><FONT
1052COLOR="#FFFFFF"
1053SIZE="3"
1054><B
1055>Home</B
1056></FONT
1057></A
1058></B
1059></FONT
1060></TD
1061><TD
1062WIDTH="25%"
1063BGCOLOR="#00C000"
1064ALIGN="center"
1065><FONT
1066COLOR="#FFFFFF"
1067SIZE="3"
1068><B
1069><A
Daniel Veillard35008381999-10-25 13:15:52 +00001070HREF="libxml-lib.html"
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001071><FONT
1072COLOR="#FFFFFF"
1073SIZE="3"
1074><B
1075>Up</B
1076></FONT
1077></A
1078></B
1079></FONT
1080></TD
1081><TD
1082WIDTH="25%"
1083BGCOLOR="#C00000"
1084ALIGN="right"
Daniel Veillard35008381999-10-25 13:15:52 +00001085><A
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001086HREF="gnome-xml-nanoftp.html"
Daniel Veillard35008381999-10-25 13:15:52 +00001087><FONT
1088COLOR="#FFFFFF"
1089SIZE="3"
1090><B
1091>Next Page &#62;&#62;&#62;</B
1092></FONT
1093></A
1094></TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001095></TR
1096><TR
1097><TD
1098COLSPAN="2"
1099ALIGN="left"
1100><FONT
1101COLOR="#FFFFFF"
1102SIZE="3"
1103><B
Daniel Veillard35008381999-10-25 13:15:52 +00001104>xpath</B
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001105></FONT
1106></TD
1107><TD
1108COLSPAN="2"
1109ALIGN="right"
Daniel Veillard35008381999-10-25 13:15:52 +00001110><FONT
1111COLOR="#FFFFFF"
1112SIZE="3"
1113><B
Daniel Veillardaeea04f2000-01-25 19:27:27 +00001114>nanoftp</B
Daniel Veillard35008381999-10-25 13:15:52 +00001115></FONT
1116></TD
Daniel Veillard7c1206f1999-10-14 09:10:25 +00001117></TR
1118></TABLE
1119></DIV
1120></BODY
1121></HTML
1122>