'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, 217👍, 0💬
What Is an HTML "code" Tag/Element? An "code" element is an inline element that you can use to speci...
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
What Is session_register() in PHP? session_register() is old function that registers global variable...
How To Submit Values without Using a Form in PHP? If you know the values you want to submit, you can...
How To Add Column Headers to a Table? If you want to add column headers to a table, you need to use ...