DELEGATE_OPTIONS (for a service)

The DELEGATE_OPTIONS element specifies options for a service using delegation.

Syntax

<DELEGATE_OPTIONS verb="OPTIONS"/>
  1. The attribute verb can only have the value OPTIONS. Its purpose is to have the dispatcher transform the original HTTP request (POST, GET, PUT, DELETE) to an HTTP OPTIONS request. This allows for the optimization of the delegation mechanism because the original request body is not sent to the delegate service, only the headers are sent.

Child elements

There are no child elements.

Usage

You use this element to configure options about how a delegation service has to work.

If the service is not configured with a delegation service, the element is ignored.

A typical use of the DELEGATE_OPTIONS feature would be to have the delegate service check for specific headers (for instance the HTTP authorization header) to see whether you want to forward the original request to the final proxy, without reading the entire original request body.

If the delegate service agrees to transmit it to the final proxy by returning the HTTP code 307 response, the dispatcher will then forward the original request plus the message body to the final proxy.

In the case that the delegate service returns something other than HTTP code 307, the original request body is discarded and the original request will get the delegate response (plus body) as response (standard delegation mechanism).

Usage example

<?xml version='1.0' encoding='windows-1252'?>
<APPLICATION Parent="ws.default" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/4.01/cfextws.xsd">
  <EXECUTION>
    <ENVIRONMENT_VARIABLE Id="FGLWSDEBUG">0</ENVIRONMENT_VARIABLE>
    <PATH>$(res.path.qa)/services/jira/gas-3501</PATH>
    <MODULE>delegate3501.42r</MODULE>
    <DELEGATE_OPTIONS verb="OPTIONS"/>
  </EXECUTION>
</APPLICATION>

In this example xcf file, the dispatcher transforms the request to an HTTP OPTIONS request.

Parent elements

This element is a child of the following: