----------------------------------------------------------------------------- -- -- libwww-ada95 : A World Wide Web client library for Ada95 -- -- W W W . R E Q U E S T -- -- B o d y -- -- 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 Text_IO; with WWW.Message; package body WWW.Request is -- Method access procedure Set_Method (Request : in out Request_Object; Method : Method_Kind) is begin Request.Method := Method; end Set_Method; function Get_Method (Request : Request_Object) return Method_Kind is begin return Request.Method; end Get_Method; -- URI access procedure Set_URI (Request : in out Request_Object; Request_URI : URI.URI_Object) is begin Request.Request_URI := Request_URI; end Set_URI; procedure Set_URI (Request : in out Request_Object; Request_URI : UB_String) is begin Request.Request_URI.URI_String := Request_URI; end Set_URI; procedure Set_URI (Request : in out Request_Object; Request_URI : STRING) is begin Set_URI (Request, UB_Strings.To_Unbounded_String (Request_URI)); end Set_URI; function Get_URI (Request : Request_Object) return URI.URI_Object is begin return Request.Request_URI; end Get_URI; function Get_URI (Request : Request_Object) return UB_String is begin return Request.Request_URI.URI_String; end Get_URI; function Get_URI (Request : Request_Object) return STRING is begin return UB_Strings.To_String (Get_URI (Request)); end Get_URI; procedure Print_Message (Request : Request_Object) is begin Text_IO.Put_Line ( Method_Kind'Image (Get_Method (Request)) & " " & Get_URI (Request) & " " & UB_Strings.To_String (Request.Protocol) & "/" & Message.Image (Request.Version)); Message.Print_Message (Message.Message_Object (Request)); end Print_Message; end WWW.Request;