<p>New powerful callbacks like <a href="#mocking-responses"><code>mockResponse</code></a> and <a href="##using-custom-backends"><code>mockResponseAsync</code></a> let you asynchronously mock responses and trigger the same callbacks as your API.</p>
<h4 class="ui header">Tools for Third-Party Integrations & Mocking</h4>
<p>New powerful callbacks like <a href="#fulfilling-responses"><code>response</code></a> and <a href="#using-custom-backends"><code>responseAsync</code></a> let you asynchronously mock responses and trigger the same callbacks as your API.</p>
</div>
@ -210,7 +210,7 @@ type : 'UI Behavior'
<h4 class="ui header">Specifying DOM Events</h4>
<p>If you need to override what action an API event occurs on you can use the <code>on</code> parameter.</p>
<div class="ui message">
API requests for the following demos have been faked using API's <code>mockResponse</code> to avoid rate throttling from public APIs. No actual data is returned.
API requests for the following demos have been faked using API's <code>response</code> setting to avoid rate throttling from public APIs. No actual data is returned.
</div>
<div class="code" data-demo="true">
$('.follow.button')
@ -798,12 +798,12 @@ type : 'UI Behavior'
<h2 class="ui dividing header">Advanced Use</h2>
<div class="no sync mocked example">
<h4 class="ui header">Mocking Responses</h4>
<p>In <code>2.0</code> API includes two new parameter <code>mockResponse</code> and <code>mockResponseAsync</code> which allows you to specify a string, or as a sync or aync function for returning an API response</p>
<h4 class="ui header">Fulfilling Responses</h4>
<p>In <code>2.0</code> API includes two new parameter <code>response</code> and <code>responseAsync</code> which allows you to specify a string, or as a sync or aync function for returning an API response. (These were previously <code>mockResponse</code> and <code>mockResponseAsync</code>.)</p>
<td>Can be set to a javascript object which will be returned automatically instead of requesting JSON from server </td>
<td>{} or false</td>
</tr>
<tr>
<td>mockResponseAsync(settings, callback)</td>
<td>responseAsync(settings, callback)</td>
<td>false</td>
<td>When specified, this function can be used to retrieve content from a server and return it asynchronously <b>instead of</b> a standard AJAX call. The callback function should return the server response.</td>