|
requestHttp
|
The requestHttp function cannot be called directly. Both getHttp
and postHttp call this function to fetch information from the internet.
The only difference between these two functions is that postHttp includes an
extra argument for specifying the body of the POST request. Typically a POST request
is used to submit a request containing names and values to be returned from a form. The first argument to requestHttp is a Uniform Resource Locater (URL).
The URL specifies the server and web page to be formed. In the following examples,
"host" stands for the IP address or the domain name such as www.yahoo.com to be accessed.
If it is omitted, the current host is used. If no current host connection has been
established, host is set to localhost. If a host is specified, it may be followed by a
colon plus the port number of the host. If no port number is specified, the port number
defaults to 80. If a portion of the URL is omitted, requestHttp uses the default value. The host
must follow a pair of slashes and a web page must follow a single slash. The web page
specification is case-sensitive if the host is a UNIX-type server. The host
specification is not case-sensitive. If no web page is specified, the host returns
the default home page. Web pages must be absolute, starting with a slash. The following
URL's are recognized: All of the HTML tags are included; however, documents referenced
within the HTML tags, such as images, are not fetched. When to use This function is not available directly. It can only be used indirectly via
getHttp or postHttp.
(requestHttp url filename msecToWait) Returns the entire contents of the specified HTML page including all tags.
If the timeout expires or if an error is detected, an error message is returned.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types url Any complete or partial URL as described above. Required. Symbol filename If provided, the returned web page is saved in the specified file on the client
machine. The file is saved in a path relative to the current working directory.
Optional argument. Text String msecToWait If provided, it sets the maximum time to wait for a page to be returned from
the host. If no response occurs in the allotted time, an error message is returned.
The default value for this parameter is about 2000 msecs. Integer
Returns:
Examples
Argument Types
Integer
String
Text
How do I contact the AIS team?