minimal HTTP implementation allowing to fetch resources like external subset. Table of Contentsconst char * xmlNanoHTTPAuthHeader (void * ctx)
void xmlNanoHTTPCleanup (void)
void xmlNanoHTTPClose (void * ctx)
int xmlNanoHTTPContentLength (void * ctx)
const char * xmlNanoHTTPEncoding (void * ctx)
int xmlNanoHTTPFetch (const char * URL, const char * filename, char ** contentType)
void xmlNanoHTTPInit (void)
void * xmlNanoHTTPMethod (const char * URL, const char * method, const char * input, char ** contentType, const char * headers, int ilen)
void * xmlNanoHTTPMethodRedir (const char * URL, const char * method, const char * input, char ** contentType, char ** redir, const char * headers, int ilen)
const char * xmlNanoHTTPMimeType (void * ctx)
void * xmlNanoHTTPOpen (const char * URL, char ** contentType)
void * xmlNanoHTTPOpenRedir (const char * URL, char ** contentType, char ** redir)
int xmlNanoHTTPRead (void * ctx, void * dest, int len)
const char * xmlNanoHTTPRedir (void * ctx)
int xmlNanoHTTPReturnCode (void * ctx)
int xmlNanoHTTPSave (void * ctxt, const char * filename)
void xmlNanoHTTPScanProxy (const char * URL)
Description
Function: xmlNanoHTTPAuthHeaderconst 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: xmlNanoHTTPCleanupvoid xmlNanoHTTPCleanup (void)
Cleanup the HTTP protocol layer.
Function: xmlNanoHTTPClosevoid xmlNanoHTTPClose (void * ctx)
This function closes an HTTP context, it ends up the connection and free all data related to it.
Function: xmlNanoHTTPContentLengthint 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: xmlNanoHTTPEncodingconst 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: xmlNanoHTTPFetchint 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 in case of success. The contentType, if provided must be freed by the caller |
Function: xmlNanoHTTPInitvoid xmlNanoHTTPInit (void)
Initialize the HTTP protocol layer. Currently it just checks for proxy information
Function: xmlNanoHTTPMethodvoid * 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: xmlNanoHTTPMethodRedirvoid * 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: xmlNanoHTTPMimeTypeconst 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: xmlNanoHTTPOpenvoid * 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 |
|