ForumsDevelopersGET vs POST


GET vs POST
Author Message
Benjamin Leclerc

Posted: Feb 23, 2011
Score: 0 Reference
Hi,

I always used the API with GET method.
Apparently it is working with the POST method.
(I tried with POST because url length is limited, GET method not always works with big notes for example)

Could you confirm API can be used with POST ?
(Btw, it shouldn't be difficult to change in php, replace $_GET by $_REQUEST and that's it)
This could be a good way to avoid url length problems.

Because I have a problem with tasks/get.php.

Apparently, with POST, the "fields" field is not used.
I only get the following task fields :
id, title, modified, completed

The other API methods seem to be working correctly.


Thanks


This message was edited Feb 23, 2011.
Jake

Toodledo Founder
Posted: Feb 23, 2011
Score: 0 Reference
In general, the API uses GET. POST can be used for calls that could exceed the url length limit, and these are specified in the documentation.

task/add, task/delete, task/edit, notebook/add, notebook/delete, notebook/edit
Benjamin Leclerc

Posted: Feb 23, 2011
Score: 0 Reference
Thank you.
Next time I'll try to open my eyes ;)
fahad

Posted: May 16, 2011
Score: 0 Reference
Benjamin I think this is partly the documentation's fault and not yours. The documentation is not clear at all in many places and I've raised my voice elsewhere. It should follow some sort of consistent documentation format whereas it does not.

Many places the examples use a particular 'field' but that field is not explained anywhere. For example "total" in <tasks total=""> is not explained anywhere. API 1.0's documentation was more clear what it did which has now changed in 2.0 and the same rules don't apply anymore.
Jake

Toodledo Founder
Posted: May 17, 2011
Score: 0 Reference
I have updated API 2.0 so that any API method can be done with either GET or POST.
You cannot reply yet

U Back to topic home

R Post a reply

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