ForumsDevelopersMalformed Edit request


Malformed Edit request
Author Message
skoren

Posted: Jul 10, 2015
Score: 0 Reference
I'm trying to edit an existing task with:

http://api.toodledo.com/3/tasks/edit.php?access_token=<my token here with no quotes>&tasks=[{"id"%3A"227944385"%2C"completed"%3A"1436568057"%2C"reschedule"%3A"1"}]

And I'm getting:
{
errorCode = 611;
errorDesc = "Malformed request.";
}

I'm sending this as a POST with the following header options:
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];

The Edit docs aren't very clear and the sample app has no edit example.

What am I missing?
Thanks.
Jake

Toodledo Founder
Posted: Jul 13, 2015
Score: 0 Reference
The 611 error will happen when the "tasks" parameter is empty or does not have parseable JSON. The URL above looks like a valid edit. I don't see any problems with it. The problem must be with the code that you haven't included. Perhaps the data is being encoded twice or perhaps it is being submitted as a GET instead, or as a POST without any values. Its hard to say with what I see here. Hopefully that's enough of a clue to get you pointed in the right direction.
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.