URL
Head
test specified URL for validity
Calling Sequence
Parameters
Options
Description
Output
Examples
References
Compatibility
Head( url, options )
url
-
a string specifying the URL from which to request data
options
options as specified below
cafile=string
a certificate file to use when authenticating the server. Maple includes a certificate file containing certificates for the major Certificate Authorities.
mode=one of text, binary, or auto
Specifies whether the reply data should be treated as a string (mode=text) or as an Array with data type integer[1] (mode=binary). When mode=auto, the data type is determined by relying on the data type provided by the server. The default is auto. This is only supported by the http and https schemes. FTP transfers are always treated as binary.
output=list or one of content, headers, or code
a list of one or more of content, headers, and code, or one of the symbols content, headers, or code. This determines what will be returned by Head. The output will be an expression sequence with the corresponding values. The default is headers. This option is only valid with http and https schemes.
password=string
the password for authentication. This supersedes any password included in url directly.
proxy=string
a URL for a proxy server. This should include the protocol, host, and port number (if not default), For example, to connect to an HTTP proxy myproxy on port 3421, use proxy="http://myproxy:3421".
proxypassword=string
password to use for authentication against the proxy specified by the proxy option.
proxyuser=string
username to use for authentication against the proxy specified by the proxy option.
redirections=integer
For HTTP transfers, the number of times Maple should follow a redirect response (HTTP status 3xx) before giving up. The default is 0, meaning redirects are not followed.
requestheaders=list(string) or table
a list of strings and equations of strings that will be added to the http header that is sent as part of the request.
responseheaders=list(string)
a list of strings specifying header fields to be returned. This only has an effect if headers is specified in the output option. If this option is not given, all received headers will be returned.
timeout=posint
the number of seconds to wait before aborting the transfer. The default is infinity (in other words, no timeout).
user=string
the user name for authentication. This supersedes any user name included in url directly.
verify=truefalse
Specifies whether Maple should authenticate the identity of the server by verifying its SSL certificate against a list of verified Certificate Authorities. The default is true. This option is only valid when using https.
The Head command tests the URL specified in url for validity using an HTTP request with the HEAD method. Head requires the URL schemes to be one of http or https.
As specified in RFC 2616, "[t]he HEAD method is identical to GET except that the server must not return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request should be identical to the information sent in response to a GET request."
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.
The output option is a list of one or more of content, headers, and code or one of the symbols content, headers, or code.
content is the content returned by the URL. You can 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.
URL:-Head⁡http://www.maplesoft.com
table⁡case_insensitive,x-frame-options=sameorigin,content-security-policy=default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://pi.pardot.com/ https://www.maplesoft.com/JS/hbx.js https://platform.twitter.com/ https://us-serve.nrich.ai/ https://us-tag.nrich.ai/ https://apis.google.com/ https://static.ads-twitter.com https://connect.facebook.net https://assets.adobedtm.com/ https://www.googletagmanager.com/ https://www.google-analytics.com/ https://www.google-analytics.com/ https://cdnjs.cloudflare.com/ https://j.6sc.co/ https://bat.bing.com/ https://snap.licdn.com/ https://www.googleadservices.com/ https://secure.quantserve.com/ https://rules.quantcount.com/ https://scripts.demandbase.com/ https://api.company-target.com/ https://cdn.tt.omtrdc.net https://maplesoftinc.tt.omtrdc.net/ https://code.jquery.com https://dpm.demdex.net/ https://googleads.g.doubleclick.net/ https://tag.demandbase.com/ https://maple.cloud/ https://www.mapleprimes.com/ https://www.maplesoft.com/ https://use.fontawesome.com/ https://code.jquery.com/ https://reports.hrmdirect.com/ https://s3.amazonaws.com/; connect-src 'self' https://maplesoftinc.tt.omtrdc.net/ https://px.ads.linkedin.com/ www.google-analytics.com https://stats.g.doubleclick.net/ https://c.6sc.co/ https://ipv6.6sc.co/ https://epsilon-globalaccelerator.6sense.com/ https://epsilon.6sense.com/ https://dpm.demdex.net/ https://google.com/ https://dpm.demdex.net/ https://api.company-target.com https://www.facebook.com/ https://cdn.linkedin.oribi.io/ https://secure.adnxs.com/ https://maplesoftcom.112.2o7.net/ https://analytics.google.com/ https://bat.bing.com/ https://pagead2.googlesyndication.com/ https://api.maplesoft.com/; img-src 'self' https://www.facebook.com/ https://analytics.twitter.com/ https://t.co/ https://us-tag.nrich.ai/ www.google-analytics.com https://stats.g.doubleclick.net https://px.ads.linkedin.com/ https://bat.bing.com/ https://pixel.quantserve.com https://b.6sc.co https://www.google.com https://www.google.ca https://cm.everesttech.net/ https://maplesoftcom.112.2o7.net/ https://maplesoft.112.2o7.net/ https://id.rlcdn.com/ https://www.maplesoft.com/ https://segments.company-target.com/ https://www.gravatar.com/ https://dpm.demdex.net/ https://www.googleadservices.com/ https://googleads.g.doubleclick.net/ https://code.jquery.com/ https://www.linkedin.com/ https://image.e.maplesoft.com/ https://image.s4.exct.net/ https://syndication.twitter.com/ https://s-static.ak.facebook.com/ https://www.googletagmanager.com/ https://api.maplesoft.com/; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com/ https://fonts.googleapis.com/ https://cdnjs.cloudflare.com/ https://use.fontawesome.com/ https://code.jquery.com https://www.mapleprimes.com/ https://www.maplesoft.com/ https://code.jquery.com/ https://reports.hrmdirect.com/ https://d22hhoe037sl7u.cloudfront.net/; base-uri 'self'; object-src 'none'; font-src 'self' https://fonts.googleapis.com/ https://fonts.googleapis.com/ https://fonts.gstatic.com/ https://use.fontawesome.com/; frame-src 'self' https://bid.g.doubleclick.net/ https://www.youtube.com/ https://www.facebook.com/ https://youtube.com/ https://maplesoft.demdex.net/ https://maplesoft.hrmdirect.com/ https://cdn.knightlab.com/ https://api.linktexting.com/ https://talent.sage.hr/ https://s.company-target.com/ https://segments.company-target.com/ https://platform.twitter.com/ https://apis.google.com/ https://accounts.google.com/ https://developers.google.com/ http://developers.google.com https://td.doubleclick.net/; media-src 'self' http://media.maplesoft.com.s3.amazonaws.com/ https://media.maplesoft.com https://media.maplesoft.com.s3.amazonaws.com/;,location=https://www.maplesoft.com/formdata,server=Microsoft-IIS/8.5,permissions-policy=browsing-topics=(),content-type=text/html; charset=utf-8,content-length=151,x-powered-by=ASP.NET,date=Fri, 01 Mar 2024 05:26:52 GMT
URL:-Head⁡https://www.maplesoft.com,output=content
Connect to maplesoft.com using proxy server http://myproxy on port 3421 with specified proxy user credentials.
URL:-Head⁡http://www.maplesoft.com,proxy=http://myproxy:3421,proxyuser=graymond,proxypassword=apple
RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, W3C.
The URL[Head] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
See Also
URL,Get
Download Help Document