Accessing URIs

/*
**	(c) COPYRIGHT MIT 1995.
**	Please first read the full copyright statement in the file COPYRIGH.
*/

This module is the application interface module to the Request class. It contains a lot of methods for loading URIs and also for uploading URIs using PUT or POST, for example. You can use the Request class directly but this module makes it easier to use by providing a lot of small request functions using the Request class in different ways. It contains help functions for accessing documents and for uploading documents to a remote server.

This module contains functions for handling all HTTP/1.1 methods:

GET Requests
PUT Requests
POST Requests
HEAD, DELETE, OPTIONS, and TRACE requests

Furthermore, it contains a few access methods for handling incoming requests - in orther words acting as a server. Although libwww is primarily for clients, it is in fact symmetric in that it can handle both client requests and server requests.

This module is implemented by HTAccess.c, and it is a part of the W3C Sample Code Library.

#ifndef HTACCESS_H
#define HTACCESS_H

#include "HTReq.h"
#include "HTAnchor.h"

Load a Document (Method = GET)

URIs can be accesses using a character string, for example "http://www.w3.org" or it can be accessed by using the libwww representation of a URI called an Anchor object. Note that we call all objects accessible through URIs for documents - this is a notion we have inherited from the hypertext world.

Load a Document from Absolute URI

Request a document referencd by an absolute URI. The output from the request is passed to the Stream Pipe Manager that figures out where to pump the data. This can for example be to the display or to a local file depending on the set of converters registered by the application.

extern BOOL HTLoadAbsolute (const char * url, HTRequest * request);

Load a Document from Relative URI

Request a document referenced by a relative URI. The relative URI is made absolute by resolving it relative to the address of the 'base' anchor.

extern BOOL HTLoadRelative (const char * 	relative,
			    HTParentAnchor *	base,
			    HTRequest *		request);

Load a Document into Memory

Request a document referred to by the URI and load it into a HTChunk object. A chunk object is a dynamic string so in the end you will have a single memory buffer containing the document. The chunk must be freed by the caller.

extern HTChunk * HTLoadToChunk (const char * url, HTRequest * request);

Load a Document and Save as a Local File

This function loads a URI and saves the contents in the specifed file. The file should not  be open, as the load function both opens and closes the file. If the file already exists then it asks the user whether the file should be overwritten or not. the contents is saved ASIS - that is - we do not touch the contents of the file!

extern BOOL HTLoadToFile (const char * url, HTRequest * request,
			  const char * filename);

Load a Document and put the Contents into a Stream

Request a document referenced by an absolute URI and sending the data down a stream. This stream can be anny stream you like, for eample one from the Stream Interface.

extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stream Interface.
extern BOOL HTLoadToStream (const char * url, HTStream * output,
			    HTRequest * by an absolute URI and sending the data down
a stream. This stream can be anny stream you like, for eample one from the
Stre