node-vkontakte
node-vkontakte copied to clipboard
Request proxy support
Added a request proxy support
I think it is needed feature for this king of module :)
There must be a better way to pass goodiness to request
without turning API into a swiss army knife with a kitchen sink. And I'm kinda working on it.
Thanks for calling it a 'king of module', anyways. :)
LOL ... miss spelled king - kind :) If you add this feature in different way it be better ...
You should probably add an ability for dependency injection for request
using request.defaults({}) then:
var vk = vkontakte('CLIENT ID', 'CLIENT SECRET');
vk.setRequest(request.defaults({proxy: ...}));
vk('users.get', { uid: 1, fields: 'uid,first_name,photo' }, function (err, user) {
console.log(user);
});
Unfortunately since you don't use oop, it's harder to implement.