|
getHttp
|
The getHttp function utilizes the internal function requestHttp.
Please refer to the description for requestHttp for more detailed information on
this operation.
When getHttp is invoked, AIS acts like a browser. It sends a request to an
internet server on the web, called the host, and receives back a page (HTML text)
from the host. The returned page may be saved locally if a filename argument is provided
or it may be returned back as a string to the calling Lambda. It is up to user of this
function to specify he correct URL to access the requested page. An optional query string may be appended to the URL. It is up to the
calling routine to URL-encode the query string to be included in the url argument.
See "HTML The Definitive Guide, O'Reilly Books" for information on forming a query string. When to use Use getHttp function to fetch web pages from the internet. Unlike
readHtmlPage, getHttp automatically manages persistent connections
to web hosts and is capable of saving the returned page in a file. See postHttp
below for automating responses to a form.
(getHTTP 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?