Page 1 of 1

400 Bad Request DBSP260

Posted: Wed Feb 26, 2014 11:08 pm
by Matthew Woods

Object must be present in the request body

I have no idea what this means. Please help. I am so close to finishing this app.


400 Bad Request DBSP260

Posted: Wed Feb 26, 2014 11:44 pm
by Alena Prykhodko

Hello Matthew,

Where exactly do you get this error?
Please tell us more details. Provide screen shots..


400 Bad Request DBSP260

Posted: Wed Feb 26, 2014 11:53 pm
by Matthew Woods

Image

It happens when I test the update service. I was stumped on why my app wasn't updating when it seemed like I was doing nothing wrong until I tested it and it spits out this error.


400 Bad Request DBSP260

Posted: Thu Feb 27, 2014 1:25 am
by Alena Prykhodko

Dear Matthew.

You have missed the "object_id" parameter.
So you should fill it as db service need to know what object should be updated.
Please see the screenshot for details.

Image


400 Bad Request DBSP260

Posted: Thu Feb 27, 2014 1:44 am
by Matthew Woods

Image Image
Image

I have object id mapped to the id spot (screenshot 1). I need to have it update the items in the table (screenshot 2) depending on how they show up instead of updating a specific item. My app currently looks like screenshot 3 but will not update because of this error. I am new to the cloud and networking in general so I'm probably missing something really simple but if I put in a specific id like your above screenshot won't it only update a single item in the database?


400 Bad Request DBSP260

Posted: Thu Feb 27, 2014 3:16 am
by Alena Prykhodko

Matthew,

Update service makes changes only to single object (specified by object_id parameter) in the database.

So if you want to update a few objects, there are two ways:

  1. Run update service for each object you have to change in DB.

  2. Implement custom save serverside code which could recieve collections of items to update.

    Please take a look at this doc http://docs.appery.io/documentation/b...

    Also you need to know how to invoke service from javascript. This topic will help https://getsatisfaction.com/apperyio/...