api.js:

* fix for huge POST requests (make sure data is POSTed, not encoded in URL)
* wrap module in immediate function
* v0.3.6