A couple questions about REST -


i have 2 questions rest

1) should try avoid sending input data when using rest? should requests try pass data possible through uri , not through post?

2) of 2 formats below more "restful"?

/tasks/delete/{task_id}

or

/tasks/{task_id}/delete/

1) should try avoid sending input data when using rest? should requests try pass data possible through uri , not through post?

if post large resource, that's fine. if need conceptually, turn post can encode parameters in request body, conflicts rest.

2) of 2 formats below more "restful"?

neither /tasks/delete/{task_id} nor /tasks/{task_id}/delete correct. "delete" verb, url should noun. if want delete task, use delete /tasks/{task_id}, rather somthing post /tasks/{task_id}/delete.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -