Salesforce

RqHTTPStatusCode (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

RqHTTPStatusCode (Magic xpa 4.x)

Controls the HTTP return status.

Syntax:

RqHttpStatusCode (status code, reason phrase)

Parameters:

status code – 3-digit number

reason phrase – a short textual description of the status code

Returns:

Logical – True for success or False for failure

Usages:

If a customer has pages already indexed by Google, the customer needs Magic xpa to set the HTTP status to 301 so that the client (and Googlebot) will know that the page has moved. In this way, the indexing of the pages will not be lost.

Example:

To report that a page was moved to another address, you must define the following within the execution of the request:

  1. Return status of 301 – RqHTTPStatusCode(301,” Moved Permanently”)

  2. New Location – RqHTTPHeader('Location: http://newaddress/page.html')

Exceptions:

This function is not supported in client-side logic of Rich Client tasks (refer to Home > Reference Guide > Web Development > Rich Internet Applications > Rich Client Functions > Rich Client Server-Side Functions).

Note:

The HTTP status code is set for the request just as the request is completed and the output is sent back to the requester. This means that the RqHTTPStatusCode function can be evaluated at any point of the request task's flow.

The last RqHTTPStatusCode to be evaluated will take effect. The next request will not be affected by any evaluation of this function in previous requests.

See also:

The Online and Rich Client Samples projects (program ES17 and RES17)

Since version: 1.9c

Reference
Attachment 
Attachment