[aerogear-dev] Aerogear.js for CRUD
Lucas Holmquist
lholmqui at redhat.com
Mon Dec 16 08:23:34 EST 2013
without even looking, that is what i was thinking the culprit is.
On Dec 16, 2013, at 7:01 AM, Sebastien Blanc <scm.blanc at gmail.com> wrote:
> Burr,
> I've added some logs statements on the client and basically it seems it can not parse the response from the server :
>
> I/Web Console( 1386): textStatus: parsererror at file:///android_asset/www/js/index.js:103
> I/Web Console( 1386): error: SyntaxError: Unexpected end of input at file:///android_asset/www/js/index.js:104
>
> If I do a CURL like this :
> curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"phoneNumber":"1234567890","email":"newTest at test.com","name":"newTest"}' http://agmobile-html5.rhcloud.com/rest/forge/members
>
> I got an correct answer but the content type is 'text/plain' , please check your rest endpoint to be sure it's producing json as output, that should solve your issue.
>
> Could you also paste the commands you used in Forge to scaffold the REST endpoints so that we can check there hasn't been an incompatibility introduced ?
>
>
>
>
> On Sat, Dec 14, 2013 at 6:06 PM, Burr Sutter <bsutter at redhat.com> wrote:
> I am having a problem with pipe.save(), likely user error :-)
>
> For some reason, the POST is occurring, the save seems to work but the error callback is invoked, not the success method.
>
> And I am doing all of this in the context of our tooling which has some limitations (auto-closing console/firebug lite)
>
> http://screencast.com/t/gosd7Qnhz
>
> REST endpoint:
> http://agmobile-html5.rhcloud.com/rest/forge/members
> Use of Forge, with the Member.java entity to offer full CRUD capabilities
>
> Sources:
> https://github.com/burrsutter/AGContacts/blob/master/www/js/index.js
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20131216/ac324a60/attachment.html
More information about the aerogear-dev
mailing list