wrappers/pl_URI.cmx
wrappers/pl_HTTP_Request_Common.cmo: perl.cmi wrappers/pl_HTTP_Request.cmo
wrappers/pl_HTTP_Request_Common.cmx: perl.cmx wrappers/pl_HTTP_Request.cmx
-wrappers/pl_HTTP_Response.cmo: perl.cmi wrappers/pl_HTTP_Message.cmo
-wrappers/pl_HTTP_Response.cmx: perl.cmx wrappers/pl_HTTP_Message.cmx
+wrappers/pl_HTTP_Response.cmo: perl.cmi wrappers/pl_HTTP_Message.cmo \
+ wrappers/pl_HTTP_Request.cmo
+wrappers/pl_HTTP_Response.cmx: perl.cmx wrappers/pl_HTTP_Message.cmx \
+ wrappers/pl_HTTP_Request.cmx
wrappers/pl_LWP_UserAgent.cmo: perl.cmi wrappers/pl_HTTP_Cookies.cmo \
wrappers/pl_HTTP_Request.cmo wrappers/pl_HTTP_Response.cmo
wrappers/pl_LWP_UserAgent.cmx: perl.cmx wrappers/pl_HTTP_Cookies.cmx \
*
* Copyright (C) 2003 Merjis Ltd.
*
- * $Id: pl_HTTP_Request.ml,v 1.3 2003-10-16 13:41:07 rich Exp $
+ * $Id: pl_HTTP_Request.ml,v 1.4 2005-01-13 16:06:04 rich Exp $
*)
open Perl
string_of_sv (call_method sv "method" [])
method set_method meth =
call_method_void sv "method" [sv_of_string meth]
+ method uri =
+ string_of_sv (call_method sv "uri" [])
+ method set_uri uri =
+ call_method_void sv "uri" [sv_of_string uri]
method as_string =
string_of_sv (call_method sv "as_string" [])
*
* Copyright (C) 2003 Merjis Ltd.
*
- * $Id: pl_HTTP_Response.ml,v 1.3 2003-10-16 13:41:07 rich Exp $
+ * $Id: pl_HTTP_Response.ml,v 1.4 2005-01-13 16:06:04 rich Exp $
*)
open Perl
open Pl_HTTP_Message
+open Pl_HTTP_Request
let _ = eval "use HTTP::Response"
string_of_sv (call_method sv "message" [])
method set_message message =
call_method_void sv "message" [sv_of_string message]
+ method request =
+ new http_request (call_method sv "request" [])
+ method set_request (req : http_request) =
+ call_method_void sv "request" [req#sv]
method status_line =
string_of_sv (call_method sv "status_line" [])
method base =
*
* Copyright (C) 2004 Merjis Ltd.
*
- * $Id: pl_WWW_Mechanize.ml,v 1.2 2004-11-26 13:33:10 rich Exp $
+ * $Id: pl_WWW_Mechanize.ml,v 1.3 2005-01-13 16:06:04 rich Exp $
*)
open Perl
(* XXX Should be able to pass args to constructor of LWP::UserAgent. *)
(* XXX WWW::Mechanize has additional parameters. *)
-let new_ () =
- let sv = call_class_method "WWW::Mechanize" "new" [] in
+let new_ ?autocheck () =
+ let args = ref [] in
+ let may f = function None -> () | Some v -> f v in
+ may (fun v ->
+ args := sv_of_string "autocheck" :: sv_of_bool v :: !args) autocheck;
+ let sv = call_class_method "WWW::Mechanize" "new" !args in
new www_mechanize sv