I am sending a post request in Android to parse.com and need to include the headers and body in a single json object as the post request body. Is this possible like this (most likely not since I get error message from parse.com response:
{
"headers": [
{
"Content-Type":"application/json",
"X-Parse-Application-Id":"key1",
"X-Parse-REST-API-Key":"key2"
"body": [
{
"ephrase": "When the going gets tough, the tough get going.",
"nvote": 154,
"pphrase": "Meaning2",
"yvote": 364
},
{
"ephrase": "Beggars can't be choosers.",
"nvote": 1,
"pphrase": "meaning1",
"yvote": 8
}
] }
If this is not going to work, I am trying the following but still get an error "107 invalid utf-8 tsring was provided" from parse.com
I include this in header section of the picture:
"Content-Type":"application/json",
"X-Parse-Application-Id":"key1",
"X-Parse-REST-API-Key":"key2"
And this in the body section where parse.com expects a json object
{ [
{
"ephrase": "When the going gets tough, the tough get going.",
"nvote": 154,
"pphrase": "",
"yvote": 364
},
{
"ephrase": "Beggars can't be choosers.",
"nvote": 1,
"pphrase": "",
"yvote": 8
}
] }
