libxml-nanohttp.html revision 60087f30f3b4cf21de48f39181736e7d71e7a661
1<HTML 2><HEAD 3><TITLE 4>nanohttp</TITLE 5><META 6NAME="GENERATOR" 7CONTENT="Modular DocBook HTML Stylesheet Version 1.64 8"><LINK 9REL="HOME" 10TITLE="Gnome XML Library Reference Manual" 11HREF="book1.html"><LINK 12REL="UP" 13TITLE="Libxml Library Reference" 14HREF="libxml-lib.html"><LINK 15REL="PREVIOUS" 16TITLE="xinclude" 17HREF="libxml-xinclude.html"><LINK 18REL="NEXT" 19TITLE="nanoftp" 20HREF="libxml-nanoftp.html"></HEAD 21><BODY 22CLASS="REFENTRY" 23BGCOLOR="#FFFFFF" 24TEXT="#000000" 25LINK="#0000FF" 26VLINK="#840084" 27ALINK="#0000FF" 28><DIV 29CLASS="NAVHEADER" 30><TABLE 31WIDTH="100%" 32BORDER="0" 33BGCOLOR="#000000" 34CELLPADDING="1" 35CELLSPACING="0" 36><TR 37><TH 38COLSPAN="4" 39ALIGN="center" 40><FONT 41COLOR="#FFFFFF" 42SIZE="5" 43>Gnome XML Library Reference Manual</FONT 44></TH 45></TR 46><TR 47><TD 48WIDTH="25%" 49BGCOLOR="#C00000" 50ALIGN="left" 51><A 52HREF="libxml-xinclude.html" 53><FONT 54COLOR="#FFFFFF" 55SIZE="3" 56><B 57><<< Previous Page</B 58></FONT 59></A 60></TD 61><TD 62WIDTH="25%" 63BGCOLOR="#0000C0" 64ALIGN="center" 65><FONT 66COLOR="#FFFFFF" 67SIZE="3" 68><B 69><A 70HREF="book1.html" 71><FONT 72COLOR="#FFFFFF" 73SIZE="3" 74><B 75>Home</B 76></FONT 77></A 78></B 79></FONT 80></TD 81><TD 82WIDTH="25%" 83BGCOLOR="#00C000" 84ALIGN="center" 85><FONT 86COLOR="#FFFFFF" 87SIZE="3" 88><B 89><A 90HREF="libxml-lib.html" 91><FONT 92COLOR="#FFFFFF" 93SIZE="3" 94><B 95>Up</B 96></FONT 97></A 98></B 99></FONT 100></TD 101><TD 102WIDTH="25%" 103BGCOLOR="#C00000" 104ALIGN="right" 105><A 106HREF="libxml-nanoftp.html" 107><FONT 108COLOR="#FFFFFF" 109SIZE="3" 110><B 111>Next Page >>></B 112></FONT 113></A 114></TD 115></TR 116></TABLE 117></DIV 118><H1 119><A 120NAME="LIBXML-NANOHTTP" 121>nanohttp</A 122></H1 123><DIV 124CLASS="REFNAMEDIV" 125><A 126NAME="AEN16847" 127></A 128><H2 129>Name</H2 130>nanohttp -- </DIV 131><DIV 132CLASS="REFSYNOPSISDIV" 133><A 134NAME="AEN16850" 135></A 136><H2 137>Synopsis</H2 138><TABLE 139BORDER="0" 140BGCOLOR="#D6E8FF" 141WIDTH="100%" 142CELLPADDING="6" 143><TR 144><TD 145><PRE 146CLASS="SYNOPSIS" 147> 148 149void <A 150HREF="libxml-nanohttp.html#XMLNANOHTTPINIT" 151>xmlNanoHTTPInit</A 152> (void); 153void <A 154HREF="libxml-nanohttp.html#XMLNANOHTTPCLEANUP" 155>xmlNanoHTTPCleanup</A 156> (void); 157void <A 158HREF="libxml-nanohttp.html#XMLNANOHTTPSCANPROXY" 159>xmlNanoHTTPScanProxy</A 160> (const char *URL); 161int <A 162HREF="libxml-nanohttp.html#XMLNANOHTTPFETCH" 163>xmlNanoHTTPFetch</A 164> (const char *URL, 165 const char *filename, 166 char **contentType); 167void* <A 168HREF="libxml-nanohttp.html#XMLNANOHTTPMETHOD" 169>xmlNanoHTTPMethod</A 170> (const char *URL, 171 const char *method, 172 const char *input, 173 char **contentType, 174 const char *headers, 175 int ilen); 176void* <A 177HREF="libxml-nanohttp.html#XMLNANOHTTPMETHODREDIR" 178>xmlNanoHTTPMethodRedir</A 179> (const char *URL, 180 const char *method, 181 const char *input, 182 char **contentType, 183 char **redir, 184 const char *headers, 185 int ilen); 186void* <A 187HREF="libxml-nanohttp.html#XMLNANOHTTPOPEN" 188>xmlNanoHTTPOpen</A 189> (const char *URL, 190 char **contentType); 191void* <A 192HREF="libxml-nanohttp.html#XMLNANOHTTPOPENREDIR" 193>xmlNanoHTTPOpenRedir</A 194> (const char *URL, 195 char **contentType, 196 char **redir); 197int <A 198HREF="libxml-nanohttp.html#XMLNANOHTTPRETURNCODE" 199>xmlNanoHTTPReturnCode</A 200> (void *ctx); 201const char* <A 202HREF="libxml-nanohttp.html#XMLNANOHTTPAUTHHEADER" 203>xmlNanoHTTPAuthHeader</A 204> (void *ctx); 205int <A 206HREF="libxml-nanohttp.html#XMLNANOHTTPREAD" 207>xmlNanoHTTPRead</A 208> (void *ctx, 209 void *dest, 210 int len); 211int <A 212HREF="libxml-nanohttp.html#XMLNANOHTTPSAVE" 213>xmlNanoHTTPSave</A 214> (void *ctxt, 215 const char *filename); 216void <A 217HREF="libxml-nanohttp.html#XMLNANOHTTPCLOSE" 218>xmlNanoHTTPClose</A 219> (void *ctx);</PRE 220></TD 221></TR 222></TABLE 223></DIV 224><DIV 225CLASS="REFSECT1" 226><A 227NAME="AEN16866" 228></A 229><H2 230>Description</H2 231><P 232></P 233></DIV 234><DIV 235CLASS="REFSECT1" 236><A 237NAME="AEN16869" 238></A 239><H2 240>Details</H2 241><DIV 242CLASS="REFSECT2" 243><A 244NAME="AEN16871" 245></A 246><H3 247><A 248NAME="XMLNANOHTTPINIT" 249></A 250>xmlNanoHTTPInit ()</H3 251><TABLE 252BORDER="0" 253BGCOLOR="#D6E8FF" 254WIDTH="100%" 255CELLPADDING="6" 256><TR 257><TD 258><PRE 259CLASS="PROGRAMLISTING" 260>void xmlNanoHTTPInit (void);</PRE 261></TD 262></TR 263></TABLE 264><P 265>Initialize the HTTP protocol layer. 266Currently it just checks for proxy informations</P 267><P 268></P 269></DIV 270><HR><DIV 271CLASS="REFSECT2" 272><A 273NAME="AEN16877" 274></A 275><H3 276><A 277NAME="XMLNANOHTTPCLEANUP" 278></A 279>xmlNanoHTTPCleanup ()</H3 280><TABLE 281BORDER="0" 282BGCOLOR="#D6E8FF" 283WIDTH="100%" 284CELLPADDING="6" 285><TR 286><TD 287><PRE 288CLASS="PROGRAMLISTING" 289>void xmlNanoHTTPCleanup (void);</PRE 290></TD 291></TR 292></TABLE 293><P 294>Cleanup the HTTP protocol layer.</P 295><P 296></P 297></DIV 298><HR><DIV 299CLASS="REFSECT2" 300><A 301NAME="AEN16883" 302></A 303><H3 304><A 305NAME="XMLNANOHTTPSCANPROXY" 306></A 307>xmlNanoHTTPScanProxy ()</H3 308><TABLE 309BORDER="0" 310BGCOLOR="#D6E8FF" 311WIDTH="100%" 312CELLPADDING="6" 313><TR 314><TD 315><PRE 316CLASS="PROGRAMLISTING" 317>void xmlNanoHTTPScanProxy (const char *URL);</PRE 318></TD 319></TR 320></TABLE 321><P 322>(Re)Initialize the HTTP Proxy context by parsing the URL and finding 323the protocol host port it indicates. 324Should be like http://myproxy/ or http://myproxy:3128/ 325A NULL URL cleans up proxy informations.</P 326><P 327></P 328><DIV 329CLASS="INFORMALTABLE" 330><A 331NAME="AEN16889" 332></A 333><P 334></P 335><TABLE 336BORDER="0" 337WIDTH="100%" 338BGCOLOR="#FFD0D0" 339CELLSPACING="0" 340CELLPADDING="4" 341CLASS="CALSTABLE" 342><TBODY 343><TR 344><TD 345WIDTH="20%" 346ALIGN="RIGHT" 347VALIGN="TOP" 348><TT 349CLASS="PARAMETER" 350><I 351>URL</I 352></TT 353> :</TD 354><TD 355WIDTH="80%" 356ALIGN="LEFT" 357VALIGN="TOP" 358> The proxy URL used to initialize the proxy context</TD 359></TR 360></TBODY 361></TABLE 362><P 363></P 364></DIV 365></DIV 366><HR><DIV 367CLASS="REFSECT2" 368><A 369NAME="AEN16898" 370></A 371><H3 372><A 373NAME="XMLNANOHTTPFETCH" 374></A 375>xmlNanoHTTPFetch ()</H3 376><TABLE 377BORDER="0" 378BGCOLOR="#D6E8FF" 379WIDTH="100%" 380CELLPADDING="6" 381><TR 382><TD 383><PRE 384CLASS="PROGRAMLISTING" 385>int xmlNanoHTTPFetch (const char *URL, 386 const char *filename, 387 char **contentType);</PRE 388></TD 389></TR 390></TABLE 391><P 392>This function try to fetch the indicated resource via HTTP GET 393and save it's content in the file.</P 394><P 395></P 396><DIV 397CLASS="INFORMALTABLE" 398><A 399NAME="AEN16904" 400></A 401><P 402></P 403><TABLE 404BORDER="0" 405WIDTH="100%" 406BGCOLOR="#FFD0D0" 407CELLSPACING="0" 408CELLPADDING="4" 409CLASS="CALSTABLE" 410><TBODY 411><TR 412><TD 413WIDTH="20%" 414ALIGN="RIGHT" 415VALIGN="TOP" 416><TT 417CLASS="PARAMETER" 418><I 419>URL</I 420></TT 421> :</TD 422><TD 423WIDTH="80%" 424ALIGN="LEFT" 425VALIGN="TOP" 426> The URL to load</TD 427></TR 428><TR 429><TD 430WIDTH="20%" 431ALIGN="RIGHT" 432VALIGN="TOP" 433><TT 434CLASS="PARAMETER" 435><I 436>filename</I 437></TT 438> :</TD 439><TD 440WIDTH="80%" 441ALIGN="LEFT" 442VALIGN="TOP" 443> the filename where the content should be saved</TD 444></TR 445><TR 446><TD 447WIDTH="20%" 448ALIGN="RIGHT" 449VALIGN="TOP" 450><TT 451CLASS="PARAMETER" 452><I 453>contentType</I 454></TT 455> :</TD 456><TD 457WIDTH="80%" 458ALIGN="LEFT" 459VALIGN="TOP" 460> if available the Content-Type information will be 461returned at that location</TD 462></TR 463><TR 464><TD 465WIDTH="20%" 466ALIGN="RIGHT" 467VALIGN="TOP" 468><I 469CLASS="EMPHASIS" 470>Returns</I 471> :</TD 472><TD 473WIDTH="80%" 474ALIGN="LEFT" 475VALIGN="TOP" 476>-1 in case of failure, 0 incase of success. The contentType, 477if provided must be freed by the caller</TD 478></TR 479></TBODY 480></TABLE 481><P 482></P 483></DIV 484></DIV 485><HR><DIV 486CLASS="REFSECT2" 487><A 488NAME="AEN16925" 489></A 490><H3 491><A 492NAME="XMLNANOHTTPMETHOD" 493></A 494>xmlNanoHTTPMethod ()</H3 495><TABLE 496BORDER="0" 497BGCOLOR="#D6E8FF" 498WIDTH="100%" 499CELLPADDING="6" 500><TR 501><TD 502><PRE 503CLASS="PROGRAMLISTING" 504>void* xmlNanoHTTPMethod (const char *URL, 505 const char *method, 506 const char *input, 507 char **contentType, 508 const char *headers, 509 int ilen);</PRE 510></TD 511></TR 512></TABLE 513><P 514>This function try to open a connection to the indicated resource 515via HTTP using the given <TT 516CLASS="PARAMETER" 517><I 518>method</I 519></TT 520>, adding the given extra headers 521and the input buffer for the request content.</P 522><P 523></P 524><DIV 525CLASS="INFORMALTABLE" 526><A 527NAME="AEN16932" 528></A 529><P 530></P 531><TABLE 532BORDER="0" 533WIDTH="100%" 534BGCOLOR="#FFD0D0" 535CELLSPACING="0" 536CELLPADDING="4" 537CLASS="CALSTABLE" 538><TBODY 539><TR 540><TD 541WIDTH="20%" 542ALIGN="RIGHT" 543VALIGN="TOP" 544><TT 545CLASS="PARAMETER" 546><I 547>URL</I 548></TT 549> :</TD 550><TD 551WIDTH="80%" 552ALIGN="LEFT" 553VALIGN="TOP" 554> The URL to load</TD 555></TR 556><TR 557><TD 558WIDTH="20%" 559ALIGN="RIGHT" 560VALIGN="TOP" 561><TT 562CLASS="PARAMETER" 563><I 564>method</I 565></TT 566> :</TD 567><TD 568WIDTH="80%" 569ALIGN="LEFT" 570VALIGN="TOP" 571> the HTTP method to use</TD 572></TR 573><TR 574><TD 575WIDTH="20%" 576ALIGN="RIGHT" 577VALIGN="TOP" 578><TT 579CLASS="PARAMETER" 580><I 581>input</I 582></TT 583> :</TD 584><TD 585WIDTH="80%" 586ALIGN="LEFT" 587VALIGN="TOP" 588> the input string if any</TD 589></TR 590><TR 591><TD 592WIDTH="20%" 593ALIGN="RIGHT" 594VALIGN="TOP" 595><TT 596CLASS="PARAMETER" 597><I 598>contentType</I 599></TT 600> :</TD 601><TD 602WIDTH="80%" 603ALIGN="LEFT" 604VALIGN="TOP" 605> the Content-Type information IN and OUT</TD 606></TR 607><TR 608><TD 609WIDTH="20%" 610ALIGN="RIGHT" 611VALIGN="TOP" 612><TT 613CLASS="PARAMETER" 614><I 615>headers</I 616></TT 617> :</TD 618><TD 619WIDTH="80%" 620ALIGN="LEFT" 621VALIGN="TOP" 622> the extra headers</TD 623></TR 624><TR 625><TD 626WIDTH="20%" 627ALIGN="RIGHT" 628VALIGN="TOP" 629><TT 630CLASS="PARAMETER" 631><I 632>ilen</I 633></TT 634> :</TD 635><TD 636WIDTH="80%" 637ALIGN="LEFT" 638VALIGN="TOP" 639> </TD 640></TR 641></TBODY 642></TABLE 643><P 644></P 645></DIV 646></DIV 647><HR><DIV 648CLASS="REFSECT2" 649><A 650NAME="AEN16961" 651></A 652><H3 653><A 654NAME="XMLNANOHTTPMETHODREDIR" 655></A 656>xmlNanoHTTPMethodRedir ()</H3 657><TABLE 658BORDER="0" 659BGCOLOR="#D6E8FF" 660WIDTH="100%" 661CELLPADDING="6" 662><TR 663><TD 664><PRE 665CLASS="PROGRAMLISTING" 666>void* xmlNanoHTTPMethodRedir (const char *URL, 667 const char *method, 668 const char *input, 669 char **contentType, 670 char **redir, 671 const char *headers, 672 int ilen);</PRE 673></TD 674></TR 675></TABLE 676><P 677>This function try to open a connection to the indicated resource 678via HTTP using the given <TT 679CLASS="PARAMETER" 680><I 681>method</I 682></TT 683>, adding the given extra headers 684and the input buffer for the request content.</P 685><P 686></P 687><DIV 688CLASS="INFORMALTABLE" 689><A 690NAME="AEN16968" 691></A 692><P 693></P 694><TABLE 695BORDER="0" 696WIDTH="100%" 697BGCOLOR="#FFD0D0" 698CELLSPACING="0" 699CELLPADDING="4" 700CLASS="CALSTABLE" 701><TBODY 702><TR 703><TD 704WIDTH="20%" 705ALIGN="RIGHT" 706VALIGN="TOP" 707><TT 708CLASS="PARAMETER" 709><I 710>URL</I 711></TT 712> :</TD 713><TD 714WIDTH="80%" 715ALIGN="LEFT" 716VALIGN="TOP" 717> The URL to load</TD 718></TR 719><TR 720><TD 721WIDTH="20%" 722ALIGN="RIGHT" 723VALIGN="TOP" 724><TT 725CLASS="PARAMETER" 726><I 727>method</I 728></TT 729> :</TD 730><TD 731WIDTH="80%" 732ALIGN="LEFT" 733VALIGN="TOP" 734> the HTTP method to use</TD 735></TR 736><TR 737><TD 738WIDTH="20%" 739ALIGN="RIGHT" 740VALIGN="TOP" 741><TT 742CLASS="PARAMETER" 743><I 744>input</I 745></TT 746> :</TD 747><TD 748WIDTH="80%" 749ALIGN="LEFT" 750VALIGN="TOP" 751> the input string if any</TD 752></TR 753><TR 754><TD 755WIDTH="20%" 756ALIGN="RIGHT" 757VALIGN="TOP" 758><TT 759CLASS="PARAMETER" 760><I 761>contentType</I 762></TT 763> :</TD 764><TD 765WIDTH="80%" 766ALIGN="LEFT" 767VALIGN="TOP" 768> the Content-Type information IN and OUT</TD 769></TR 770><TR 771><TD 772WIDTH="20%" 773ALIGN="RIGHT" 774VALIGN="TOP" 775><TT 776CLASS="PARAMETER" 777><I 778>redir</I 779></TT 780> :</TD 781><TD 782WIDTH="80%" 783ALIGN="LEFT" 784VALIGN="TOP" 785> the redirected URL OUT</TD 786></TR 787><TR 788><TD 789WIDTH="20%" 790ALIGN="RIGHT" 791VALIGN="TOP" 792><TT 793CLASS="PARAMETER" 794><I 795>headers</I 796></TT 797> :</TD 798><TD 799WIDTH="80%" 800ALIGN="LEFT" 801VALIGN="TOP" 802> the extra headers</TD 803></TR 804><TR 805><TD 806WIDTH="20%" 807ALIGN="RIGHT" 808VALIGN="TOP" 809><TT 810CLASS="PARAMETER" 811><I 812>ilen</I 813></TT 814> :</TD 815><TD 816WIDTH="80%" 817ALIGN="LEFT" 818VALIGN="TOP" 819> </TD 820></TR 821></TBODY 822></TABLE 823><P 824></P 825></DIV 826></DIV 827><HR><DIV 828CLASS="REFSECT2" 829><A 830NAME="AEN17001" 831></A 832><H3 833><A 834NAME="XMLNANOHTTPOPEN" 835></A 836>xmlNanoHTTPOpen ()</H3 837><TABLE 838BORDER="0" 839BGCOLOR="#D6E8FF" 840WIDTH="100%" 841CELLPADDING="6" 842><TR 843><TD 844><PRE 845CLASS="PROGRAMLISTING" 846>void* xmlNanoHTTPOpen (const char *URL, 847 char **contentType);</PRE 848></TD 849></TR 850></TABLE 851><P 852>This function try to open a connection to the indicated resource 853via HTTP GET.</P 854><P 855></P 856><DIV 857CLASS="INFORMALTABLE" 858><A 859NAME="AEN17007" 860></A 861><P 862></P 863><TABLE 864BORDER="0" 865WIDTH="100%" 866BGCOLOR="#FFD0D0" 867CELLSPACING="0" 868CELLPADDING="4" 869CLASS="CALSTABLE" 870><TBODY 871><TR 872><TD 873WIDTH="20%" 874ALIGN="RIGHT" 875VALIGN="TOP" 876><TT 877CLASS="PARAMETER" 878><I 879>URL</I 880></TT 881> :</TD 882><TD 883WIDTH="80%" 884ALIGN="LEFT" 885VALIGN="TOP" 886> The URL to load</TD 887></TR 888><TR 889><TD 890WIDTH="20%" 891ALIGN="RIGHT" 892VALIGN="TOP" 893><TT 894CLASS="PARAMETER" 895><I 896>contentType</I 897></TT 898> :</TD 899><TD 900WIDTH="80%" 901ALIGN="LEFT" 902VALIGN="TOP" 903> if available the Content-Type information will be 904returned at that location</TD 905></TR 906></TBODY 907></TABLE 908><P 909></P 910></DIV 911></DIV 912><HR><DIV 913CLASS="REFSECT2" 914><A 915NAME="AEN17020" 916></A 917><H3 918><A 919NAME="XMLNANOHTTPOPENREDIR" 920></A 921>xmlNanoHTTPOpenRedir ()</H3 922><TABLE 923BORDER="0" 924BGCOLOR="#D6E8FF" 925WIDTH="100%" 926CELLPADDING="6" 927><TR 928><TD 929><PRE 930CLASS="PROGRAMLISTING" 931>void* xmlNanoHTTPOpenRedir (const char *URL, 932 char **contentType, 933 char **redir);</PRE 934></TD 935></TR 936></TABLE 937><P 938>This function try to open a connection to the indicated resource 939via HTTP GET.</P 940><P 941></P 942><DIV 943CLASS="INFORMALTABLE" 944><A 945NAME="AEN17026" 946></A 947><P 948></P 949><TABLE 950BORDER="0" 951WIDTH="100%" 952BGCOLOR="#FFD0D0" 953CELLSPACING="0" 954CELLPADDING="4" 955CLASS="CALSTABLE" 956><TBODY 957><TR 958><TD 959WIDTH="20%" 960ALIGN="RIGHT" 961VALIGN="TOP" 962><TT 963CLASS="PARAMETER" 964><I 965>URL</I 966></TT 967> :</TD 968><TD 969WIDTH="80%" 970ALIGN="LEFT" 971VALIGN="TOP" 972> The URL to load</TD 973></TR 974><TR 975><TD 976WIDTH="20%" 977ALIGN="RIGHT" 978VALIGN="TOP" 979><TT 980CLASS="PARAMETER" 981><I 982>contentType</I 983></TT 984> :</TD 985><TD 986WIDTH="80%" 987ALIGN="LEFT" 988VALIGN="TOP" 989> if available the Content-Type information will be 990returned at that location</TD 991></TR 992><TR 993><TD 994WIDTH="20%" 995ALIGN="RIGHT" 996VALIGN="TOP" 997><TT 998CLASS="PARAMETER" 999><I 1000>redir</I 1001></TT 1002> :</TD 1003><TD 1004WIDTH="80%" 1005ALIGN="LEFT" 1006VALIGN="TOP" 1007> if availble the redirected URL will be returned</TD 1008></TR 1009></TBODY 1010></TABLE 1011><P 1012></P 1013></DIV 1014></DIV 1015><HR><DIV 1016CLASS="REFSECT2" 1017><A 1018NAME="AEN17043" 1019></A 1020><H3 1021><A 1022NAME="XMLNANOHTTPRETURNCODE" 1023></A 1024>xmlNanoHTTPReturnCode ()</H3 1025><TABLE 1026BORDER="0" 1027BGCOLOR="#D6E8FF" 1028WIDTH="100%" 1029CELLPADDING="6" 1030><TR 1031><TD 1032><PRE 1033CLASS="PROGRAMLISTING" 1034>int xmlNanoHTTPReturnCode (void *ctx);</PRE 1035></TD 1036></TR 1037></TABLE 1038><P 1039>Get the latest HTTP return code received</P 1040><P 1041></P 1042><DIV 1043CLASS="INFORMALTABLE" 1044><A 1045NAME="AEN17049" 1046></A 1047><P 1048></P 1049><TABLE 1050BORDER="0" 1051WIDTH="100%" 1052BGCOLOR="#FFD0D0" 1053CELLSPACING="0" 1054CELLPADDING="4" 1055CLASS="CALSTABLE" 1056><TBODY 1057><TR 1058><TD 1059WIDTH="20%" 1060ALIGN="RIGHT" 1061VALIGN="TOP" 1062><TT 1063CLASS="PARAMETER" 1064><I 1065>ctx</I 1066></TT 1067> :</TD 1068><TD 1069WIDTH="80%" 1070ALIGN="LEFT" 1071VALIGN="TOP" 1072> the HTTP context</TD 1073></TR 1074><TR 1075><TD 1076WIDTH="20%" 1077ALIGN="RIGHT" 1078VALIGN="TOP" 1079><I 1080CLASS="EMPHASIS" 1081>Returns</I 1082> :</TD 1083><TD 1084WIDTH="80%" 1085ALIGN="LEFT" 1086VALIGN="TOP" 1087>the HTTP return code for the request.</TD 1088></TR 1089></TBODY 1090></TABLE 1091><P 1092></P 1093></DIV 1094></DIV 1095><HR><DIV 1096CLASS="REFSECT2" 1097><A 1098NAME="AEN17062" 1099></A 1100><H3 1101><A 1102NAME="XMLNANOHTTPAUTHHEADER" 1103></A 1104>xmlNanoHTTPAuthHeader ()</H3 1105><TABLE 1106BORDER="0" 1107BGCOLOR="#D6E8FF" 1108WIDTH="100%" 1109CELLPADDING="6" 1110><TR 1111><TD 1112><PRE 1113CLASS="PROGRAMLISTING" 1114>const char* xmlNanoHTTPAuthHeader (void *ctx);</PRE 1115></TD 1116></TR 1117></TABLE 1118><P 1119>Get the authentication header of an HTTP context</P 1120><P 1121></P 1122><DIV 1123CLASS="INFORMALTABLE" 1124><A 1125NAME="AEN17068" 1126></A 1127><P 1128></P 1129><TABLE 1130BORDER="0" 1131WIDTH="100%" 1132BGCOLOR="#FFD0D0" 1133CELLSPACING="0" 1134CELLPADDING="4" 1135CLASS="CALSTABLE" 1136><TBODY 1137><TR 1138><TD 1139WIDTH="20%" 1140ALIGN="RIGHT" 1141VALIGN="TOP" 1142><TT 1143CLASS="PARAMETER" 1144><I 1145>ctx</I 1146></TT 1147> :</TD 1148><TD 1149WIDTH="80%" 1150ALIGN="LEFT" 1151VALIGN="TOP" 1152> the HTTP context</TD 1153></TR 1154><TR 1155><TD 1156WIDTH="20%" 1157ALIGN="RIGHT" 1158VALIGN="TOP" 1159><I 1160CLASS="EMPHASIS" 1161>Returns</I 1162> :</TD 1163><TD 1164WIDTH="80%" 1165ALIGN="LEFT" 1166VALIGN="TOP" 1167>the stashed value of the WWW-Authenticate or Proxy-Authenticate 1168header.</TD 1169></TR 1170></TBODY 1171></TABLE 1172><P 1173></P 1174></DIV 1175></DIV 1176><HR><DIV 1177CLASS="REFSECT2" 1178><A 1179NAME="AEN17081" 1180></A 1181><H3 1182><A 1183NAME="XMLNANOHTTPREAD" 1184></A 1185>xmlNanoHTTPRead ()</H3 1186><TABLE 1187BORDER="0" 1188BGCOLOR="#D6E8FF" 1189WIDTH="100%" 1190CELLPADDING="6" 1191><TR 1192><TD 1193><PRE 1194CLASS="PROGRAMLISTING" 1195>int xmlNanoHTTPRead (void *ctx, 1196 void *dest, 1197 int len);</PRE 1198></TD 1199></TR 1200></TABLE 1201><P 1202>This function tries to read <TT 1203CLASS="PARAMETER" 1204><I 1205>len</I 1206></TT 1207> bytes from the existing HTTP connection 1208and saves them in <TT 1209CLASS="PARAMETER" 1210><I 1211>dest</I 1212></TT 1213>. This is a blocking call.</P 1214><P 1215></P 1216><DIV 1217CLASS="INFORMALTABLE" 1218><A 1219NAME="AEN17089" 1220></A 1221><P 1222></P 1223><TABLE 1224BORDER="0" 1225WIDTH="100%" 1226BGCOLOR="#FFD0D0" 1227CELLSPACING="0" 1228CELLPADDING="4" 1229CLASS="CALSTABLE" 1230><TBODY 1231><TR 1232><TD 1233WIDTH="20%" 1234ALIGN="RIGHT" 1235VALIGN="TOP" 1236><TT 1237CLASS="PARAMETER" 1238><I 1239>ctx</I 1240></TT 1241> :</TD 1242><TD 1243WIDTH="80%" 1244ALIGN="LEFT" 1245VALIGN="TOP" 1246> the HTTP context</TD 1247></TR 1248><TR 1249><TD 1250WIDTH="20%" 1251ALIGN="RIGHT" 1252VALIGN="TOP" 1253><TT 1254CLASS="PARAMETER" 1255><I 1256>dest</I 1257></TT 1258> :</TD 1259><TD 1260WIDTH="80%" 1261ALIGN="LEFT" 1262VALIGN="TOP" 1263> a buffer</TD 1264></TR 1265><TR 1266><TD 1267WIDTH="20%" 1268ALIGN="RIGHT" 1269VALIGN="TOP" 1270><TT 1271CLASS="PARAMETER" 1272><I 1273>len</I 1274></TT 1275> :</TD 1276><TD 1277WIDTH="80%" 1278ALIGN="LEFT" 1279VALIGN="TOP" 1280> the buffer length</TD 1281></TR 1282><TR 1283><TD 1284WIDTH="20%" 1285ALIGN="RIGHT" 1286VALIGN="TOP" 1287><I 1288CLASS="EMPHASIS" 1289>Returns</I 1290> :</TD 1291><TD 1292WIDTH="80%" 1293ALIGN="LEFT" 1294VALIGN="TOP" 1295>the number of byte read. 0 is an indication of an end of connection. 1296-1 indicates a parameter error.</TD 1297></TR 1298></TBODY 1299></TABLE 1300><P 1301></P 1302></DIV 1303></DIV 1304><HR><DIV 1305CLASS="REFSECT2" 1306><A 1307NAME="AEN17110" 1308></A 1309><H3 1310><A 1311NAME="XMLNANOHTTPSAVE" 1312></A 1313>xmlNanoHTTPSave ()</H3 1314><TABLE 1315BORDER="0" 1316BGCOLOR="#D6E8FF" 1317WIDTH="100%" 1318CELLPADDING="6" 1319><TR 1320><TD 1321><PRE 1322CLASS="PROGRAMLISTING" 1323>int xmlNanoHTTPSave (void *ctxt, 1324 const char *filename);</PRE 1325></TD 1326></TR 1327></TABLE 1328><P 1329>This function saves the output of the HTTP transaction to a file 1330It closes and free the context at the end</P 1331><P 1332></P 1333><DIV 1334CLASS="INFORMALTABLE" 1335><A 1336NAME="AEN17116" 1337></A 1338><P 1339></P 1340><TABLE 1341BORDER="0" 1342WIDTH="100%" 1343BGCOLOR="#FFD0D0" 1344CELLSPACING="0" 1345CELLPADDING="4" 1346CLASS="CALSTABLE" 1347><TBODY 1348><TR 1349><TD 1350WIDTH="20%" 1351ALIGN="RIGHT" 1352VALIGN="TOP" 1353><TT 1354CLASS="PARAMETER" 1355><I 1356>ctxt</I 1357></TT 1358> :</TD 1359><TD 1360WIDTH="80%" 1361ALIGN="LEFT" 1362VALIGN="TOP" 1363> the HTTP context</TD 1364></TR 1365><TR 1366><TD 1367WIDTH="20%" 1368ALIGN="RIGHT" 1369VALIGN="TOP" 1370><TT 1371CLASS="PARAMETER" 1372><I 1373>filename</I 1374></TT 1375> :</TD 1376><TD 1377WIDTH="80%" 1378ALIGN="LEFT" 1379VALIGN="TOP" 1380> the filename where the content should be saved</TD 1381></TR 1382><TR 1383><TD 1384WIDTH="20%" 1385ALIGN="RIGHT" 1386VALIGN="TOP" 1387><I 1388CLASS="EMPHASIS" 1389>Returns</I 1390> :</TD 1391><TD 1392WIDTH="80%" 1393ALIGN="LEFT" 1394VALIGN="TOP" 1395>-1 in case of failure, 0 incase of success.</TD 1396></TR 1397></TBODY 1398></TABLE 1399><P 1400></P 1401></DIV 1402></DIV 1403><HR><DIV 1404CLASS="REFSECT2" 1405><A 1406NAME="AEN17133" 1407></A 1408><H3 1409><A 1410NAME="XMLNANOHTTPCLOSE" 1411></A 1412>xmlNanoHTTPClose ()</H3 1413><TABLE 1414BORDER="0" 1415BGCOLOR="#D6E8FF" 1416WIDTH="100%" 1417CELLPADDING="6" 1418><TR 1419><TD 1420><PRE 1421CLASS="PROGRAMLISTING" 1422>void xmlNanoHTTPClose (void *ctx);</PRE 1423></TD 1424></TR 1425></TABLE 1426><P 1427>This function closes an HTTP context, it ends up the connection and 1428free all data related to it.</P 1429><P 1430></P 1431><DIV 1432CLASS="INFORMALTABLE" 1433><A 1434NAME="AEN17139" 1435></A 1436><P 1437></P 1438><TABLE 1439BORDER="0" 1440WIDTH="100%" 1441BGCOLOR="#FFD0D0" 1442CELLSPACING="0" 1443CELLPADDING="4" 1444CLASS="CALSTABLE" 1445><TBODY 1446><TR 1447><TD 1448WIDTH="20%" 1449ALIGN="RIGHT" 1450VALIGN="TOP" 1451><TT 1452CLASS="PARAMETER" 1453><I 1454>ctx</I 1455></TT 1456> :</TD 1457><TD 1458WIDTH="80%" 1459ALIGN="LEFT" 1460VALIGN="TOP" 1461> the HTTP context</TD 1462></TR 1463></TBODY 1464></TABLE 1465><P 1466></P 1467></DIV 1468></DIV 1469></DIV 1470><DIV 1471CLASS="NAVFOOTER" 1472><BR 1473CLEAR="all"><BR><TABLE 1474WIDTH="100%" 1475BORDER="0" 1476BGCOLOR="#000000" 1477CELLPADDING="1" 1478CELLSPACING="0" 1479><TR 1480><TD 1481WIDTH="25%" 1482BGCOLOR="#C00000" 1483ALIGN="left" 1484><A 1485HREF="libxml-xinclude.html" 1486><FONT 1487COLOR="#FFFFFF" 1488SIZE="3" 1489><B 1490><<< Previous Page</B 1491></FONT 1492></A 1493></TD 1494><TD 1495WIDTH="25%" 1496BGCOLOR="#0000C0" 1497ALIGN="center" 1498><FONT 1499COLOR="#FFFFFF" 1500SIZE="3" 1501><B 1502><A 1503HREF="book1.html" 1504><FONT 1505COLOR="#FFFFFF" 1506SIZE="3" 1507><B 1508>Home</B 1509></FONT 1510></A 1511></B 1512></FONT 1513></TD 1514><TD 1515WIDTH="25%" 1516BGCOLOR="#00C000" 1517ALIGN="center" 1518><FONT 1519COLOR="#FFFFFF" 1520SIZE="3" 1521><B 1522><A 1523HREF="libxml-lib.html" 1524><FONT 1525COLOR="#FFFFFF" 1526SIZE="3" 1527><B 1528>Up</B 1529></FONT 1530></A 1531></B 1532></FONT 1533></TD 1534><TD 1535WIDTH="25%" 1536BGCOLOR="#C00000" 1537ALIGN="right" 1538><A 1539HREF="libxml-nanoftp.html" 1540><FONT 1541COLOR="#FFFFFF" 1542SIZE="3" 1543><B 1544>Next Page >>></B 1545></FONT 1546></A 1547></TD 1548></TR 1549><TR 1550><TD 1551COLSPAN="2" 1552ALIGN="left" 1553><FONT 1554COLOR="#FFFFFF" 1555SIZE="3" 1556><B 1557>xinclude</B 1558></FONT 1559></TD 1560><TD 1561COLSPAN="2" 1562ALIGN="right" 1563><FONT 1564COLOR="#FFFFFF" 1565SIZE="3" 1566><B 1567>nanoftp</B 1568></FONT 1569></TD 1570></TR 1571></TABLE 1572></DIV 1573></BODY 1574></HTML 1575>