REST Architecture - Resources and Methods

In REST architecture, what is the difference between a resource and a method. There is one?

+3
source share
3 answers

A resource is what defines your application; they are very similar to objects. Method is one of the HTTP verbs-for example GET, POST, PUT, DELETE. They are similar to the methods that are called on your resource.

I really recommend you read Architectural styles and design of network architectures (Dr. Fielding, where he defines REST) ​​and / or RESTful Web Services , which does stellar work showing how to put theory into practice.

+2

RESTify DayTrader . , "" URI URI.

+2

A resource is an interesting state that a distributed application developer decided to create a URL for.

http://example.org/foo

may be a resource identifier. How can,

http://example.org/foos?state=open

A method is an action or operation that can be performed on this resource. eg.

GET http://example.org/foo
0
source

Source: https://habr.com/ru/post/1751115/


All Articles