APLX Help
: System Classes
: Methods
: Head
|
|
![]() |
The 'Head' method |
Argument: Character Vector Valid for: HTTPClient The Head method retrieves information about a page or other file from a web-server. The argument is a character vector which is the URL (e.g. 'http://www.microapl.co.uk/apl/index.html'). The result is a three element vector. The first element is the HTTP return code, which is an integer scalar. A number in the range 200 to 299 indicates success. A number in the range 400 to 499 indicates an error, such as 404 meaning 'page not found'. The second element is a character vector indicating the MIME type of the returned data, such as 'text/plain'. The third element is a character vector containing the HTTP header associated with the page. For example: (errcode mimetype text) ← HTTP.Head 'http://www.microapl.co.uk/apl' errcode 200 mimetype text/html text Server: Zeus/4.2 Date: Wed, 09 Feb 2005 12:19:41 GMT Content-Type: text/html Content-Length: 10437 Accept-Ranges: bytes Last-Modified: Thu, 07 Oct 2004 11:35:34 GMT |
|
APLX Help
: System Classes
: Methods
: Head
|
Copyright © 1996-2010 MicroAPL Ltd