component / model

Minimalistic extensible data models
122 stars 40 forks source link

Expose request object for configuration of superagent #53

Closed wejendorp closed 10 years ago

wejendorp commented 10 years ago

Makes the superagent handles extendible via plugins. I use this for forcing superagent.Request.prototype._withCredentials = true in order to make the models work cross origin.

yields commented 10 years ago

+1 i do this in a different component, but it's hackish.

wejendorp commented 10 years ago

How have you done that?

yields commented 10 years ago

i monkey patched superagent directly.

lib/model

patch(require('superagent'));
module.exports = require('model');