2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
8 YUI.add('yql-nodejs', function (Y, NAME) {
11 * NodeJS plugin for YQL to use native request to make requests instead of JSONP.
12 * Not required by the user, it's conditionally loaded and should "just work".
14 * @submodule yql-nodejs
17 var request = require('request');
19 //Over writes Y.YQLRequest._send to use request instead of JSONP
20 Y.YQLRequest.prototype._send = function (url, o) {
23 timeout: o.timeout || (30 * 1000)
24 }, function(err, res) {
26 //The signature that YQL requires
31 o.on.success(JSON.parse(res.body));