, : , RESTful? API , , , .
-, REST , . REST HTTP , API HTTP- -, URL- -.
:
- GET/foo < - GET -.
- POST/foo < - POST
- PUT/foo/bar < - PUT . , URL-, , URL-.
- DELETE / foo / bar <- should be obvious
For example, if your API had a single URL endpoint, and the method was chosen by what is inside the POST data, then this is probably not RESTful. On the other hand, if each URL was a resource, and the API was used to move the URLs, and that something that changed something used POST / PUT and everything that requested something used by GET, this is what most would consider RESTful.
Crast source
share