Salesforce

HTTPLastHeader (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

HTTPLastHeader (Magic xpa 3.x)

Retrieves the value of an HTTP header entry from the entry name. The function queries the HTTP header information received from the last HTTP retrieval from the HTTPCall, HTTPGet or HTTPPost functions.

Syntax:

HTTPLastHeader(header title)

Parameters:

header title: A string value that represents a header title type. For example, Content-Type, Expires, or Content-Length.

Returns:

A string value represents the defined header entry.
If the header title is a blank string, the return value is the entire header.

The function will return a value if used after an HTTP request. Performing calls to another program or event will clear the value returned by the HTTPLastHeader function.

Usages:

To retrieve the header list.

Example:

After performing an HTTPGet operation that returns an HTML page, the HTTPLastHeader('Content-Type') returns 'text/html'.

When passing a blank string as the header title, the HTTPLastHeader('') returns

'HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Thu, 13 July 2000 05:46:53 GMT
Content-Length:2291
Content-Type: text/html
Cache-Control: private'

Note:

  • Use the HTTP Framework setting to define the underlying infrastructure.

  • If the HTTPCall, HTTPPost or HTTPGet functions were not used, the HTTPLastHeader function returns a blank string. If Magic xpa cannot locate the header title, the function also returns a blank string.

See also:

The Online and Rich Client Samples projects (program EL24 and REL24)

Reference
Attachment 
Attachment