1 (** Wrapper around Perl [HTTP::Response] class.
3 * Copyright (C) 2003 Merjis Ltd.
5 * $Id: pl_HTTP_Response.ml,v 1.4 2005-01-13 16:06:04 rich Exp $
13 let _ = eval "use HTTP::Response"
15 class http_response sv =
18 inherit http_message sv
21 string_of_sv (call_method sv "code" [])
22 method set_code code =
23 call_method_void sv "code" [sv_of_string code]
25 string_of_sv (call_method sv "message" [])
26 method set_message message =
27 call_method_void sv "message" [sv_of_string message]
29 new http_request (call_method sv "request" [])
30 method set_request (req : http_request) =
31 call_method_void sv "request" [req#sv]
33 string_of_sv (call_method sv "status_line" [])
35 string_of_sv (call_method sv "base" [])
37 string_of_sv (call_method sv "as_string" [])
39 bool_of_sv (call_method sv "is_info" [])
41 bool_of_sv (call_method sv "is_success" [])
43 bool_of_sv (call_method sv "is_redirect" [])
45 bool_of_sv (call_method sv "is_error" [])
46 method error_as_HTML =
47 string_of_sv (call_method sv "error_as_HTML" [])