rest - Give me a example of non-RESTful design? -
i learned term "restful" rails developer. after reading wikipedia, here , here.
i don't it. seems me, rails using concise way describe urls. seems me every uri restful, in it's designed scope.
for example, think get /delete?student_id=3 restful in scope the application itself.
can tell me constrict violate? please refer constrict rest definition.
a get request should idempotent , request should not leave side-effects on server. quoting http spec sec 9.1.1:
in particular, convention has been established
get,headmethods should not have significance of taking action other retrieval. these methods ought considered "safe". allows user agents represent other methods, suchpost,put,delete, in special way, user made aware of fact possibly unsafe action being requested.
therefore get /delete?student_id=3 violates idempotency assumption of get verb, since delete record on server.
a restful interface uniform interface, in other words means get supposed behave required http spec. , the spec says:
the
getmethod means retrieve whatever information (in form of entity) identified request-uri. if request-uri refers data-producing process, produced data shall returned entity in response , not source text of process, unless text happens output of process....
Comments
Post a Comment