4 Replies Latest reply on Feb 5, 2015 8:02 AM by pawans

    Issue with osapi.jive.connects.post to Play 2.0 application on Heroku

    ignacio

      Hi all,

       

      I'm trying to connect my Jive app to my Play 2.0 application on Heroku. Unfortunately, while osapi.jive.connects.get seems to work fine, I'm encountering some issues with osapi.jive.connects.post that I hope you can help me with:

       

      1) Jive connects service:

       

      I've set up an anonymous connects under MyAlias service because my server side application currently does not require certification. It seems to work just fine for osapi.jive.connects.get. The service points to the base URL.

       

      2) The curl HTTP request is (this seems to work):

       

      curl -v -H "Content-Type: application/json" -X POST -d '{ "email" : "test@test.com", "password" : "test_password"}' http://<MY URL>/login

       

      3) My corresponding Javascript code in the Jive app html file is:

       

              osapi.jive.connects.post({

                  "alias" : "MyAlias",

                  "href" : "/login",

                  "body" : { "email" : "test@test.com", "password" : "test_password"}

              }).execute(function(response) {

                  if (response.error) {

                      alert(response.error.code + " " + response.error.message);

                  }

                  else {

                      alert(response.status + " " + response.content);

                      gadgets.window.adjustHeight();

                  }

              });

       

      I would very much appreciate any thoughts you might have. Thanks a lot in advance! Cheers,

       

      Ignacio