HTTP
Get
Retrieve a data from a URL using the HTTP GET method
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Get(URI, options)
URI
-
host, port, and URL path of the form http://host:port/path/to/file?query; the uniform resource identifier
forcemode=name
either text or binary this forces the transfer to be done in the given mode regardless of the Content-Type reported by the server.
headers=list
list of header values; duplicate values will be combined into a single comma-separated list.
timeout=posint
the number of seconds to wait for data before timing out.
The Get command retrieves whatever information (in the form of an entity) is identified by the Request-URI.
Currently, only text content types are supported.
Get returns a sequence (code, content, headers) with code set to the return code sent by the server, content containing the body of the server response and the headers as a table.
status,data,headers≔HTTP:-Get⁡https://www.maplesoft.com/,timeout=100:
HTTP:-Code⁡status
OK
type⁡data,string
true
data1..72
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/
type⁡headers,table
headersContent-Type
text/html; charset=utf-8
status,data,headers≔HTTP:-Get⁡https://www.maplesoft.com/common/images/logo.jpg:
image/jpeg
data
HTTP:-Get⁡http://0.0.0.0
Error, (in HTTP:-Get) cannot establish
The HTTP[Get] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
HTTP[Code]
HTTP[Post]
Download Help Document