The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 50 more by this user. Created: 03/9/11
Last CDN Push: 06/27/12
Build Tag: gallery-2012.06.27-20-10
Project: YUI 3
License: YUI BSD
YUI Version: 3.5.1
Free for use.
This IO module allows the server to return an unlimited number of responses to a single request. This can be useful if you need to return results in small batches, as they become available, instead of all at once, after the processing is finished. It is also useful as a replacement for chained requests. The chaining logic can be implemented on the server, so the server doesn't have to wait for the next request before working on it.
Simple example of making a multiresponse call to the server. You can also specify data and/or a form (possibly with upload:true), just like with any other call to Y.io().
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.06.27-20-10'
}).use('gallery-io-multiresponse', function(Y)
{
Y.io('my-multi-response-uri',
{
multiresponse: true,
json: { b:2, y:'z' }, // will be serialized and sent as the json parameter
on:
{
response: function(id, data)
{
// data contains the object returned by the server
// This function is invoked for every response.
}
}
});
});
Subject | Author | Date |
---|---|---|
Why Multi-response not return request object? | Mayank Gupta | 06/17/12 |
Re: Why Multi-response not return request object? | John Lindal | 06/22/12 |
Re: Why Multi-response not return request object? | Mayank Gupta | 06/29/12 |
All code on this site is licensed under the BSD License unless stated otherwise.