Jala Test

## Class jala.Test.HttpClient

    Object
       |
       +--jala.Test.HttpClient

class jala.Test.HttpClient

Instances of this class represent a http client useable for testing, as any session cookies received by the tested application are stored and used for subsequent requests, allowing simple "walkthrough" tests.
Defined in Global/jala.Test.js

Constructor Summary
`jala.Test.HttpClient ()` Constructs a new HttpClient instance

Method Summary
`Object` | `executeRequest(<String> method, <String> url, <Object> param)` Sends a HTTP request to the Url passed as argument
`helma.Http` | `getClient()` Returns the http client used
`Array` | `getCookies()` Returns the cookies set for this http client
`Object` | `getUrl(<String> url, <Object> param)` Convenience method for requesting the url passed as argument using method GET
`void` | `setCookies(<Array> arr)` Sets the cookie to use for subsequent requests using this client
`Object` | `submitForm(<String> url, <Object> param)` Convenience method for submitting a form.

Constructor Detail

### jala.Test.HttpClient

    jala.Test.HttpClient()

Constructs a new HttpClient instance

Returns:

A newly constructed HttpClient

Method Detail

### executeRequest

    Object executeRequest(<String> method, <String> url, <Object> param)

Sends a HTTP request to the Url passed as argument

Parameters:

`method` - The HTTP method to use

`url` - The url to request

`param` - A parameter object to use with this request

Returns:

An object containing response values

See:

- helma.Http.prototype.getUrl

### getClient

    helma.Http getClient()

Returns the http client used

Returns:

The http client used

### getCookies

    Array getCookies()

Returns the cookies set for this http client

Returns:

The cookies to use for subsequent requests

### getUrl

    Object getUrl(<String> url, <Object> param)

Convenience method for requesting the url passed as argument using method GET

Parameters:

`url` - The url to request

`param` - A parameter object to use with this request

Returns:

An object containing response values

See:

- helma.Http.prototype.getUrl

### setCookies

    void setCookies(<Array> arr)

Sets the cookie to use for subsequent requests using this client

Parameters:

`arr` - The cookie object as received from helma.Http.getUrl

### submitForm

    Object submitForm(<String> url, <Object> param)

Convenience method for submitting a form.

Parameters:

`url` - The url to request

`param` - A parameter object to use with this request

Returns:

An object containing response values

See:

- helma.Http.prototype.getUrl

Jala Test

Documentation generated by JSDoc on Tue Jan 8 15:50:17 2008