Construct - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


URL

  

Construct

  

construct a URL from its components

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

Construct( componentTable, component1, component2, ... )

Parameters

componentTable

-

a table of component/value pairs. The components should be specified as a string.

component

-

an equation specifying a component to be added to the constructed URL

Description

• 

Construct builds a URL string of the given components.

• 

The URL will be of the form: scheme://user:password@host:port/urlpath?query#anchor

• 

The following components are supported:

– 

scheme=string The protocol to be used.  The default is http.

– 

user=string The username to be used.  The default is none.

– 

password=string The password to be used.  The default is none.

– 

host=string The host portion.  This component is required.

– 

port=integer The port on the host to connect to.  The default is none.

– 

urlpath=string The path on the host to access.  The default is /.

– 

query=list(string,equation) Query data to be added to the URL.  The default is none.

– 

anchor=string An anchor to add to the URL.  The default is none.

• 

These components can be specified as parameters or a table of component/value pairs.  A component specified as a parameter will override one specified in a table.

• 

The Parse method performs the reverse operation, splitting a given URL into a table of components.

Examples

URL:-Constructscheme=scheme,user=user,password=password,host=host,port=1234,urlpath=urlpath,query=query,anchor=anchor

scheme://user:password@host:1234/urlpath?query#anchor

(1)

URL:-Constructtablescheme=scheme,user=user,password=password,host=host,port=1234,urlpath=urlpath,query=query,anchor=anchor

scheme://user:password@host:1234/urlpath?query#anchor

(2)

URL:-Constructscheme=http,host=www.maplesoft.com

http://www.maplesoft.com/

(3)

References

  

RFC 3986: Uniform Resource Identifier (URI), W3C.

Compatibility

• 

The URL[Construct] command was introduced in Maple 18.

• 

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

See Also

URL

URL/Escape

URL/Parse

URL/Unescape