http://swpat.ffii.org/Action against software patents http://www.gnome.org/Gnome2 Logo http://www.w3.org/StatusW3C Logo http://www.redhat.com/Red Hat Logo http://xmlsoft.org/Made with Libxml2 Logo 
Module nanohttp from libxml2
API Menu ../index.htmlMain Menu ../docs.htmlDeveloper Menu ../examples/index.htmlCode Examples index.htmlAPI Menu libxml-parser.htmlParser API libxml-tree.htmlTree API libxml-xmlreader.htmlReader API ../guidelines.htmlXML Guidelines ../ChangeLog.htmlChangeLog API Indexes ../APIchunk0.htmlAlphabetic ../APIconstructors.htmlConstructors ../APIfunctions.htmlFunctions/Types ../APIfiles.htmlModules ../APIsymbols.htmlSymbols Related links http://mail.gnome.org/archives/xml/Mail archive http://xmlsoft.org/XSLT/XSLT libxslt http://phd.cs.unibo.it/gdome2/DOM gdome2 http://www.aleksey.com/xmlsec/XML-DSig xmlsec ftp://xmlsoft.org/FTP http://www.zlatkovic.com/projects/libxml/Windows binaries http://www.blastwave.org/packages.php/libxml2Solaris binaries http://www.explain.com.au/oss/libxml2xslt.htmlMacOsX binaries http://libxmlplusplus.sourceforge.net/C++ bindings http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4PHP bindings http://sourceforge.net/projects/libxml2-pas/Pascal bindings http://rubyforge.org/projects/xml-tools/Ruby bindings http://tclxml.sourceforge.net/Tcl bindings http://bugzilla.gnome.org/buglist.cgi?product=libxml2Bug Tracker libxml-nanoftp.htmlPrev libxml-nanoftp.htmlnanoftp index.htmlUp index.htmlAPI documentation ../index.htmlHome ../index.htmlThe XML C parser and toolkit of Gnome libxml-parser.htmlparser libxml-parser.htmlNext minimal HTTP implementation allowing to fetch resources like external subset. 
Table of Contents
const char *	#xmlNanoHTTPAuthHeaderxmlNanoHTTPAuthHeader 	(void * ctx)void	#xmlNanoHTTPCleanupxmlNanoHTTPCleanup 		(void)void	#xmlNanoHTTPClosexmlNanoHTTPClose 		(void * ctx)int	#xmlNanoHTTPContentLengthxmlNanoHTTPContentLength 	(void * ctx)const char *	#xmlNanoHTTPEncodingxmlNanoHTTPEncoding 	(void * ctx)int	#xmlNanoHTTPFetchxmlNanoHTTPFetch 		(const char * URL, 					 const char * filename, 					 char ** contentType)void	#xmlNanoHTTPInitxmlNanoHTTPInit 			(void)void *	#xmlNanoHTTPMethodxmlNanoHTTPMethod 		(const char * URL, 					 const char * method, 					 const char * input, 					 char ** contentType, 					 const char * headers, 					 int ilen)void *	#xmlNanoHTTPMethodRedirxmlNanoHTTPMethodRedir 		(const char * URL, 					 const char * method, 					 const char * input, 					 char ** contentType, 					 char ** redir, 					 const char * headers, 					 int ilen)const char *	#xmlNanoHTTPMimeTypexmlNanoHTTPMimeType 	(void * ctx)void *	#xmlNanoHTTPOpenxmlNanoHTTPOpen 			(const char * URL, 					 char ** contentType)void *	#xmlNanoHTTPOpenRedirxmlNanoHTTPOpenRedir 		(const char * URL, 					 char ** contentType, 					 char ** redir)int	#xmlNanoHTTPReadxmlNanoHTTPRead 			(void * ctx, 					 void * dest, 					 int len)const char *	#xmlNanoHTTPRedirxmlNanoHTTPRedir 	(void * ctx)int	#xmlNanoHTTPReturnCodexmlNanoHTTPReturnCode 		(void * ctx)int	#xmlNanoHTTPSavexmlNanoHTTPSave 			(void * ctxt, 					 const char * filename)void	#xmlNanoHTTPScanProxyxmlNanoHTTPScanProxy 		(const char * URL)Description
Function: xmlNanoHTTPAuthHeader
const char *	xmlNanoHTTPAuthHeader	(void * ctx)Get the authentication header of an HTTP context
ctx: the HTTP context Returns: the stashed value of the WWW-Authenticate or Proxy-Authenticate header. Function: xmlNanoHTTPCleanup
void	xmlNanoHTTPCleanup		(void)Cleanup the HTTP protocol layer.
Function: xmlNanoHTTPClose
void	xmlNanoHTTPClose		(void * ctx)This function closes an HTTP context, it ends up the connection and free all data related to it.
ctx: the HTTP context Function: xmlNanoHTTPContentLength
int	xmlNanoHTTPContentLength	(void * ctx)Provides the specified content length from the HTTP header.
ctx: the HTTP context Returns: the specified content length from the HTTP header. Note that a value of -1 indicates that the content length element was not included in the response header. Function: xmlNanoHTTPEncoding
const char *	xmlNanoHTTPEncoding	(void * ctx)Provides the specified encoding if specified in the HTTP headers.
ctx: the HTTP context Returns: the specified encoding or NULL if not available Function: xmlNanoHTTPFetch
int	xmlNanoHTTPFetch		(const char * URL, 					 const char * filename, 					 char ** contentType)This function try to fetch the indicated resource via HTTP GET and save it's content in the file.
URL: The URL to load filename: the filename where the content should be saved contentType: if available the Content-Type information will be returned at that location Returns: -1 in case of failure, 0 incase of success. The contentType, if provided must be freed by the caller Function: xmlNanoHTTPInit
void	xmlNanoHTTPInit			(void)Initialize the HTTP protocol layer. Currently it just checks for proxy informations
Function: xmlNanoHTTPMethod
void *	xmlNanoHTTPMethod		(const char * URL, 					 const char * method, 					 const char * input, 					 char ** contentType, 					 const char * headers, 					 int ilen)This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.
URL: The URL to load method: the HTTP method to use input: the input string if any contentType: the Content-Type information IN and OUT headers: the extra headers ilen: input length Returns: NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller Function: xmlNanoHTTPMethodRedir
void *	xmlNanoHTTPMethodRedir		(const char * URL, 					 const char * method, 					 const char * input, 					 char ** contentType, 					 char ** redir, 					 const char * headers, 					 int ilen)This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.
URL: The URL to load method: the HTTP method to use input: the input string if any contentType: the Content-Type information IN and OUT redir: the redirected URL OUT headers: the extra headers ilen: input length Returns: NULL in case of failure, otherwise a request handler. The contentType, or redir, if provided must be freed by the caller Function: xmlNanoHTTPMimeType
const char *	xmlNanoHTTPMimeType	(void * ctx)Provides the specified Mime-Type if specified in the HTTP headers.
ctx: the HTTP context Returns: the specified Mime-Type or NULL if not available Function: xmlNanoHTTPOpen
void *	xmlNanoHTTPOpen			(const char * URL, 					 char ** contentType)This function try to open a connection to the indicated resource via HTTP GET.
URL: The URL to load contentType: if available the Content-Type information will be returned at that location Returns: NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller Function: xmlNanoHTTPOpenRedir
void *	xmlNanoHTTPOpenRedir		(const char * URL, 					 char ** contentType, 					 char ** redir)This function try to open a connection to the indicated resource via HTTP GET.
URL: The URL to load contentType: if available the Content-Type information will be returned at that location redir: if available the redirected URL will be returned Returns: NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller Function: xmlNanoHTTPRead
int	xmlNanoHTTPRead			(void * ctx, 					 void * dest, 					 int len)This function tries to read @len bytes from the existing HTTP connection and saves them in @dest. This is a blocking call.
ctx: the HTTP context dest: a buffer len: the buffer length Returns: the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error. Function: xmlNanoHTTPRedir
const char *	xmlNanoHTTPRedir	(void * ctx)Provides the specified redirection URL if available from the HTTP header.
ctx: the HTTP context Returns: the specified redirection URL or NULL if not redirected. Function: xmlNanoHTTPReturnCode
int	xmlNanoHTTPReturnCode		(void * ctx)Get the latest HTTP return code received
ctx: the HTTP context Returns: the HTTP return code for the request. Function: xmlNanoHTTPSave
int	xmlNanoHTTPSave			(void * ctxt, 					 const char * filename)This function saves the output of the HTTP transaction to a file It closes and free the context at the end
ctxt: the HTTP context filename: the filename where the content should be saved Returns: -1 in case of failure, 0 incase of success. Function: xmlNanoHTTPScanProxy
void	xmlNanoHTTPScanProxy		(const char * URL)(Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A NULL URL cleans up proxy informations.
URL: The proxy URL used to initialize the proxy context ../bugs.htmlDaniel Veillard 
