WebUrl Function

Action

Requests and reads a complete document specified by a URL using FTP or HTTP. Use localhost if you want to connect to the local server.

Include file

WebAPI.bdh

Syntax

WebUrl( in sUrl  : string,
        in fWait : float optional ): boolean;

Return value

  • true if the worker thread communicating with the server could be started successfully

  • false otherwise. The return value will not inform about any Web traffic-related problems due to independent threaded operation.

Parameter Description
sUrl Complete URL to the file on the server
fWait Minimum time or minimum mean time that this function call has to last (optional). Default value is 0.0

Example

dcltrans
  transaction TMain
  var 
   fMyWait : float init 5.0;
  begin
    WebUrl("http://www.myserver.com/index.html", 0.0);
    WebUrl("http://user:pass@www.myserver.com/index.html", 50.0);
    WebUrl("http://www.myserver.com:80/", 0.5);
    WebUrl("ftp://user:pass@ftp.myserver.com:21", fMyWait);
  end TMain;

Sample scripts

WebAuth01.bdf, WebCookie01.bdf, WebEncoding01.bdf, WebForms01.bdf, WebForms03.bdf, WebHello.bdf, WebHttp11.bdf, WebHttpHeaders01.bdf, WebIncreasingWorkload.bdf, WebMeasure01.bdf, WebMulti01.bdf, WebMultiClientIpAddresses01.bdf, WebParseResponseHeader01.bdf, WebRegularExpressions01.bdf, WebSecure02.bdf, WebStatusCodes01.bdf, WebStone01.bdf, WebTimer01.bdf, WebUrl01.bdf

SilkEssential sample

Ftp.sep