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
Post a Comment