Redirection

Instead of presenting information to a user when that user visits a particular URL, we may instead choose to redirect that user to another URL, at which there may be information to be viewed. To redirect a user of an application, we can use the following transaction method:

WebStack API - Redirection

WebStack provides the following method in transaction objects to perform redirection:

redirect
This method accepts a path value suitable for use in response headers indicating the location to which a user shall be redirected. An optional response code (see "Responses and Presentation") can be specified to modify the meaning of the redirection (as defined in the HTTP specifications).

Since the path value must be usable in response header, it is necessary to transform paths as described in the "Encoding and Decoding Path Values" document, and an example of redirection is given in that document.