Tools, FAQ, Tutorials:
'send-request' Policy Statement
How to use the "send-request" Policy statement to call an extra web service for an Azure API service operation?
✍: FYIcenter.com
The "send-request" Policy Statement allows you to call an extra web service
and store the response in a given variable.
The "send-request" statement has the following syntax:
<send-request mode="new|copy" response-variable-name="" timeout="60 sec" ignore-error="false|true"> <set-url>...</set-url> <set-method>...</set-method> <set-header name="" exists-action="override|skip|append|delete">...</set-header> <set-body>...</set-body> </send-request>
Where:
For example, the following inbound policy makes an extra web service call. The response of the call will be stored a context variable called "loginResponse":
<inbound> <send-request mode="new" response-variable-name="loginResponse" timeout="20" ignore-error="true"> <set-url>http://dev.fyicenter.com/api/authorization</set-url> <set-method>POST</set-method> <set-header name="Authorization" exists-action="override"> <value>basic dXNlcm5hbWU6cGFzc3dvcmQ=</value> </set-header> </send-request> </inbound>
Â
⇒ 'send-one-way-request' Policy Statement
⇠'return-response' Policy Statement
2018-01-13, 2253👍, 0💬
Popular Posts:
What is EPUB 2.0 Metadata "dc:date" Element? EPUB 2.0 Metadata "dc:date" is an optional metadata ele...
Where to find tutorials on the 2017 version of API Management Services at Azure Portal? Here is a li...
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....
How to Instantiate Chaincode on BYFN Channel? You can follow this tutorial to Instantiate Chaincode ...
How to use urllib.parse.urlencode() function to encode HTTP POST data? My form data has special char...