Convert method

Converts the data ealier retrieved from server with FetchData method into necessary format.

Convert [format]

Parameters

format
The number specifying format:
ValueFormat
1 (default)Binary safearray
2Text string

Return value

The method returns the converted data in the specified format.

Example

The following example retrieves HTML text from the url:

Set tcpip=CreateObject("SHOTIP.Connection")
Set http=tcpip.http
url="http://thatserver.domain.com/the/required/document.htm"
http.FetchData url
if http.StatusCode = 200 then
 text = http.Convert(2)
end if