HTTP/Get - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : HTTP/Get

HTTP

  

Get

  

Retrieve a data from a URL using the HTTP GET method

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Get(URI, options)

Parameters

URI

-

host, port, and URL path of the form http://host:port/path/to/file?query; the uniform resource identifier

Options

• 

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.

Description

• 

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.

Examples

status,data,headersHTTP:-Gethttps://www.maplesoft.com/,timeout=100:

HTTP:-Codestatus

OK

(1)

typedata,string

true

(2)

data1..72

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/

(3)

typeheaders&comma;table

true

(4)

headersContent-Type

text/html; charset=utf-8

(5)

status,data,headersHTTP:-Gethttps://www.maplesoft.com/common/images/logo.jpg&colon;

headersContent-Type

image/jpeg

(6)

data

−1&comma;−40&comma;−1&comma;−31&comma;0&comma;24&comma;69&comma;120&comma;105&comma;102&comma;0&comma;0&comma;73&comma;73&comma;42&comma;0&comma;8&comma;0&comma;0&comma;0&comma;0&comma;0&comma;0&comma;0&comma;0&comma;0&comma;0&comma;0&comma;−1&comma;−20&comma;0&comma;17&comma;68&comma;117&comma;99&comma;107&comma;121&comma;0&comma;1&comma;0&comma;4&comma;0&comma;0&comma;0&comma;60&comma;0&comma;0&comma;−1&comma;−31&comma;3&comma;−70&comma;104&comma;116&comma;116&comma;112&comma;58&comma;47&comma;47&comma;110&comma;115&comma;46&comma;97&comma;100&comma;111&comma;98&comma;101&comma;46&comma;99&comma;111&comma;109&comma;47&comma;120&comma;97&comma;112&comma;47&comma;49&comma;46&comma;48&comma;47&comma;0&comma;60&comma;63&comma;120&comma;112&comma;97&comma;99&comma;107&comma;101&comma;116&comma;32&comma;98&comma;101&comma;103&comma;105&comma;110&comma;61&comma;34&comma;−17&comma;−69&comma;−65&comma;&comma;⋯ 5346 Array entries not shown

(7)

HTTP:-Gethttp://0.0.0.0

Error, (in HTTP:-Get) cannot establish

Compatibility

• 

The HTTP[Get] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

HTTP

HTTP[Code]

HTTP[Post]