Class HttpRequest

Superclasses :
util::SetFields
lang::Object
Package :
http

Encapsulate one request to HttpClient.

Source

Class summary
Methods inherited from util::SetFields
as_attrib(attr, val) attrib(a[]) cset_val(attr, val) field_error(s) int_val(attr, val) int_vals(attr, val, n) numeric_val(attr, val) numeric_vals(attr, val, n) set_fields(l) string_val(attr, val) string_vals(attr, val, n) test_flag(attr, val)
Methods inherited from lang::Object
clone(seen) equals(other, seen) get_class() get_class_name() get_id() hash_code(depth, seen) is_instance(name) to_string(depth, seen)
Methods defined in this class
add_header(key, val) initially() set_content_type(content_type) set_data_file(s) set_header(key, val) set_html_form_data(t) set_method(the_method) set_one(attr, val) set_password(s) set_post_data(post_data) set_referer(s) set_url(url) set_use_temporary_data_file() set_username(s) unset_header(key)
Variables defined in this class
content_type data_file headers password post_data referer the_method url username

Method detail

add_header(key, val)

Add a request header with the given key, after any existing ones with the same key
Source

initially()


set_content_type(content_type)

Set the content type of the post data.
Source

set_data_file(s)

Set a filename to send the data part of the response to. If not set then the data forms part of the HttpPage object returned.
Parameters :
s - the name of the file.
Source

set_header(key, val)

Set a request header with the given key; any existing headers with the same key are removed.
Source

set_html_form_data(t)

Convenience method to set the post data from a table which represents html form post data. The content type is set appropriately too.
Source

set_method(the_method)

Set the request method type. The default is GET, unless post data is set, in which case the default is POST.
Source

set_one(attr, val)

Overrides set_one(attr, val) in util::SetFields
Source

set_password(s)

Set the password to use for authentication
Source

set_post_data(post_data)

Set the data to be used in a POST request, and set the method to "POST".
Parameters :
post_data - A string
Source

set_referer(s)

Set the referer page.
Source

set_url(url)

Set the desired url.
Source

set_use_temporary_data_file()

Setup a temporary file for the HttpClient object to use as a data file. On success, this will be returned as a field in the HttpPage object.
Source

set_username(s)

Set the username to use for authentication
Source

unset_header(key)

Unset the header(s) for the given key
Source

Variable detail

content_type


data_file


headers


password


post_data


referer


the_method


url


username