fetch data specified by a URL - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : Web Page Access : URL package : URL/Get

URL[Get] - fetch data specified by a URL

Calling Sequence

Get( url, options )

Parameters

url

-

a string specifying the URL from which to request data

options

-

options as specified below

Description

• 

The Get method fetches the data specified in url and imports it into Maple.  The data will be returned as a string or Array with data type integer[1] (this is controlled by the scheme and the mode option).

• 

Get currently supports three url schemes: http, https and ftp.  Not all options to Get are valid for all URL schemes.

• 

For http and https, a Content-Type (as specified in the http header) of text will be returned as a string.  All other content types are returned as an Array of integer[1].  This can be overridden using the mode option. For ftp, all transfers are binary, and the result will be returned as an Array of integer[1].

• 

The output option is a list of one or more of content, headers, and code.

content is the content returned by the URL.  One may also specify content=string where the string is a filename to which the data will be written.

headers refers to the http (and https) header received from the server.  It is not supported for urls with the ftp scheme.  It is returned as a table of strings.

code refers to the http (and https) status code returned by the server.  It is not supported for urls with the ftp scheme.  It is returned as an integer.

Examples

URL:-Gethttp://www.maplesoft.com:

URL:-Gethttps://www.maplesoft.com,timeout=100:

URL:-Getftp://ftp.cert.org/pub/README:

Connect to maplesoft.com using proxy server http://myproxy on port 3421 with specified proxy user credentials.

URL:-Gethttp://www.maplesoft.com,proxy=http://myproxy:3421,proxyuser=graymond,proxypassword=apple

See Also

StringTools,Encode, URL, URL,Construct, URL,Encode, URL,Post


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam