WebPageUrl Function

Action

Requests and reads a complete document specified by a URL using the specified HTTP method. Use localhost if you want to connect to the local server. If the retrieved document is of content type HTML, it is parsed and embedded documents are requested.

Include file

WebAPI.bdh

Syntax

WebPageUrl(
  in sUrl : string,
  in sTimer : string optional,
in formUrl : form optional): boolean;

Return value

  • true if the page is downloaded successfully

  • false otherwise

Parameter Description
sUrl Absolute URL to the file on the server. All characters that are part of the query string are not URL-encoded.
sTimer Name of the timer used for page measurements (optional). If this parameter is omitted, no measurements are performed.
formUrl Form identifier used in the dclform section (optional). The expanded form string is appended to the URL after the "?". All unsafe characters are URL-encoded.

Example

dcltrans
  transaction TMain
  begin
    WebPageUrl("http://lab3/shopit/product.asp?code=2");
    WebPageUrl("http://lab3/shopit/product.asp",
"ShopIt - Product", SHOPIT_PRODUCT_ASP002);
  end TMain;
dclform
  SHOPIT_PRODUCT_ASP002:
    "code" := "2";