0

How can I set POST request body using REST Library?

I am trying to connect to CouchDB using Mojitos REST library. However I am not sure how to set a POST request body.

by
1 Reply
  • The params argument will be used as BODY when a post is issued.

    Y.mojito.lib.REST.POST('your-url', 'BODY does here', {headers: {}, timeout: 12345}, myCallbackFunction);

    Official documentation is here, and it does not cover the POST:

    http://developer.yahoo.com/cocktails/mojito/docs/api_overview/mojito_rest_lib.html

    Docs contributions are welcome!

    P.S: REST Library in mojito is just a wrapper around Y.io, my recommendation is to use Y.io instead :)

    0

Recent Posts

in Yahoo! Mojito