(* Interface to a plugin to perform HTTP requests for KPs *) (* XXX There are several problems with this plugin. See ../plugins/http/child.py for details. *) (* $Id: HTTPAPI.isl,v 1.3 1997/02/11 20:51:58 guido Exp $ *) (* $Source: /projects/cvsroot/koe/src/koe/interfaces/HTTPAPI.isl,v $ *) INTERFACE HTTPAPI IMPORTS FileAPI END; TYPE String = ilu.CString; TYPE KeyValuePair = ARRAY OF 2 String; TYPE KeyValuePairs = SEQUENCE OF KeyValuePair; EXCEPTION FactoryFailed : ilu.CString; TYPE Factory = OBJECT METHODS GetHTTPRequester(): Requester RAISES FactoryFailed END "Gets a protocol access object" END; TYPE Requester = OBJECT METHODS Get(url: ilu.CString): FileAPI.File RAISES FileAPI.FileIOError END "Performs an HTTP request, returning an object with file semantics.", GetWithInfo(url: ilu.CString, OUT headers: KeyValuePairs): FileAPI.File RAISES FileAPI.FileIOError END "Like Get(), but also returns the protocol headers.", (* The special key ".url" in the "headers" return value gives the URL of the retrieved document. (This may differ from the URL argument if redirection happened.) *) ASYNCHRONOUS Close() "Destroys the requester object." END;