we might be able to use http://weluse.github.io/hyperagent/ for this, but I haven't quite figure it out yet .