----------------------------------------------------------------------------- -- -- libwww-ada95 : A World Wide Web client library for Ada95 -- -- W W W . R E Q U E S T -- -- S p e c -- -- Copyright (C) 1997-1998 Regents of the University of California -- -- libwww-ada95 is free software; you can redistribute it and/or modify it -- under the terms of the GNU General Public License as published by the Free -- Software Foundation, with or without the single exception listed below; -- either version 2, or (at your option) any later version. libwww-ada95 is -- distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -- without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -- PARTICULAR PURPOSE. See the GNU General Public License for more details. -- You should have received a copy of the GNU General Public License -- distributed with libwww-ada95; see the file COPYING. If not, write to the -- Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -- -- As a special exception, if other files instantiate generics from this -- library, or you link this library with other files to produce an -- executable, this library does not by itself cause the resulting -- executable to be covered by the GNU General Public License. This -- exception does not however invalidate any other reasons why the -- executable file might be covered by the GNU General Public License. -- -- Created in 1997 by Kari Nies ----------------------------------------------------------------------------- with Ada.Strings.Unbounded; with WWW.Message; with URI; package WWW.Request is package UB_Strings renames Ada.Strings.Unbounded; subtype UB_String is Ada.Strings.Unbounded.Unbounded_String; type Method_Kind is ( Options, Get, Head, Post, Put, Delete, Trace, Unknown ); type Request_Object is new Message.Message_Object with record Method : Method_Kind; Request_URI : URI.URI_Object; end record; -- Method access procedure Set_Method (Request : in out Request_Object; Method : Method_Kind); function Get_Method (Request : Request_Object) return Method_Kind; -- URI access procedure Set_URI (Request : in out Request_Object; Request_URI : URI.URI_Object); procedure Set_URI (Request : in out Request_Object; Request_URI : UB_String); procedure Set_URI (Request : in out Request_Object; Request_URI : STRING); function Get_URI (Request : Request_Object) return URI.URI_Object; function Get_URI (Request : Request_Object) return UB_String; function Get_URI (Request : Request_Object) return STRING; procedure Print_Message (Request : Request_Object); end WWW.Request;