Tools, FAQ, Tutorials:
'mock-response' Policy Statement
How to use the "mock-response" Policy statement to return an example response for an Azure API service operation?
✍: FYIcenter.com
The "mock-response" Policy Statement allows you to return a fake response
and stop the Azure API processing immediately.
The "mock-response" Statement has the following syntax:
<mock-response status-code="code (default 200)" content-type="media type"/>
For example, the following inbound policy returns a response with status code 200 and the first body example under status 200 defined in the API operation:
<inbound> ... <mock-response/> </inbound>
The following inbound policy returns a response with status code 202 and the body example of "application/json" type under status 201 defined in the API operation:
<inbound> ... <mock-response status-code='201' content-type='application/json'/> </inbound>
⇒ 'return-response' Policy Statement
2018-01-16, ∼1993🔥, 0💬
Popular Posts:
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...
How to install .NET Framework in Visual Studio Community 2017? I have the Visual Studio Installer in...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...