1 (** Wrapper around Perl [HTTP::Request] class.
3 * Copyright (C) 2003 Merjis Ltd.
5 * $Id: pl_HTTP_Request.ml,v 1.3 2003-10-16 13:41:07 rich Exp $
13 let _ = eval "use HTTP::Request"
15 class http_request sv =
18 inherit http_message sv
23 string_of_sv (call_method sv "method" [])
24 method set_method meth =
25 call_method_void sv "method" [sv_of_string meth]
27 string_of_sv (call_method sv "as_string" [])
31 let new_ meth ?uri_obj ?uri (* ?header ?content *) () =
33 match uri_obj, uri with
35 failwith ("Pl_HTTP_Request.new_ must be called with either a "^
36 "~uri_obj (URI object) or ~uri (string) parameter.")
37 | Some (uri_obj : uri), None ->
38 call_class_method "HTTP::Request" "new" [sv_of_string meth;
41 call_class_method "HTTP::Request" "new" [sv_of_string meth;