Performs an HTTP HEAD operation on a URL. An HTTP HEAD is the same as an HTTP GET, except that the server will not include the message body in the response. Only headers will be returned. This can be used to verify the validity of a URL, or to examine what headers will be returned from an HTTP GET request.
The HTTP Response status code will be stored in the _http_status_code
attribute. In addition, the HTTP response headers will be saved in the list attribute specified by the List Attribute for Response Headers parameter.
The HTTP status code and HTTP response headers will be logged with each request.
For more information on HTTP Status Codes, please refer to http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. For a list of common HTTP response headers, please refer to http://en.wikipedia.org/wiki/List_of_HTTP_header_fields.
If an error occurs while accessing the URL, the translation will continue, and the feature will be output via the <REJECTED> port.
Depending on the HTTP transformer, this parameter is either URL that will be accessed by the transformer, or the URL that identifies where data will be uploaded.
This parameter can be used to provide custom headers for the HTTP Request. Each header should be entered as plain text, on a single line. For example:
User-Agent: FME/Workbench (http://www.safe.com)
Accept-Language: en-US
Expect: 100-continue
If this parameter is set to Yes, any saved cookies that correspond to the URL being accessed will be sent with the request. In addition, any cookies contained in the response will be saved for use with subsequent HTTP requests.
Saved cookies will persist for the duration of the translation – they cannot be used in subsequent translations.
Saving cookies is useful when a web service keeps a "session". Then the following sequence of operations might be used:
This parameter is optional. If it is set to a list attribute name, then HTTP headers returned by the server will be stored in the list attribute. The headers will be split into names and values. For example:
`_headers{0}.name' has value `X-XSS-Protection' `_headers{0}.value' has value `1; mode=block' `_headers{1}.name' has value `Date' `_headers{1}.value' has value `Wed, 25 May 2011 17:20:20 GMT' `_headers{2}.name' has value `Transfer-Encoding' `_headers{2}.value' has value `chunked' `_headers{3}.name' has value `Content-Type' `_headers{3}.value' has value `text/html; charset=ISO-8859-1' `_headers{4}.name' has value `Cache-Control' `_headers{4}.value' has value `private, max-age=0'
This parameter is optional. If it is set to an attribute name, then the HTTP response code returned by the server will be stored in the attribute.
The optional HTTP Authentication Username, HTTP Authentication Password and HTTP Authentication Method parameters may be set for accessing a password-protected HTTP server. Basic, Digest, and NTLM access authentication methods are supported:
Note that although the HTTP Basic access authentication is a mechanism designed to allow a client to provide credentials to a server on the assumption that the connection between them is trusted and secure, be aware that any credentials passed from client to server can be easily intercepted through an insecure connection.
You can also use this transformer to access the contents of an FTP URL. If required, an FTP username and password can be specified in the HTTP Authentication Username and HTTP Authentication Password parameters. The contents of the file (or the filename if the Save File parameter is set to Yes) will be stored in the specified target attribute. When accessing an FTP URL, the _http_status_code
attribute will not be populated.
The optional Proxy URL, Proxy Port, Proxy Username, Proxy Password, and Proxy Authentication Method parameters may be set for organizations that require Internet access via an HTTP proxy server.
Basic, Digest, and NTLM access authentication methods are supported:
About Transformer Parameter Options
FME Professional edition and above
Search for samples and information about this transformer on FMEpedia.