'mock-response' Policy Statement
How to use the "mock-response" Policy statement to return an example response for an Azure API service operation?
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>
2018-01-16, 253👍, 0💬
Where to find tutorials on HTML language? I want to know how to learn HTML. Here is a large collecti...
How To Use Different Markers on Ordered List Items? By default, browsers will use decimal numbers as...
How To Use an Array as a Queue in PHP? A queue is a simple data structure that manages data elements...
What Types of Data Can Be Used as Array Keys in PHP? Two types of data can be used as array keys: st...
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value mul...