Component Methods

The following methods are supported by the AspTear component:




AddCookie(CookieName, CookieValue)

Add a cookie to the page request. Cookies must be added before either calling Retrieve or Save.

AddHeader(Headername, Headervalue)

Add an additional header to the request. Headers must be added before either calling Retrieve or Save. Note that the COOKIE header can be modified only via the AddCookie method.


Resets all component properties to their default values. Use it when retrieving multiple files in a row with different parameters.

Retrieve(URL, Method, Payload, Username, Password)

Payload is the Querystring or POST data. It is formatted as follows: variable=Server.UrlEncode(data)&

If Username and Password are not needed, supply an empty string.

Method is an integer, with POST being represented by 1, GET with 2, and HEAD with 3.

Save(URL, Method, Payload, Filename, Username, Password)

Parameters are the same as for Retrieve. Filename, however, must be supplied with Server.MapPath already applied (component does not rely on OnStartPage event from IIS, thus being usable from all Automation environments)