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