What this resource represents, whether pre-existing data or data that is generated dynamically, depends on the implementation of the Service Provider.
Often, the resource corresponds to a file or the output of an executable residing on the server.
The HTTP/1.0 specification[11] defines the
HTTP MethodThe HTTP/1.1 specification[12] added 5 new methods:
By being specified in these documents their semantics are well known and can be depended on. Any client can use any method and the server can be configured to support any combination of methods.
If a method is unknown to an intermediate it will be treated as an unsafe and non-idempotent method. There is no limit to the number of methods that can be defined and this allows for future methods to be specified without breaking existing infrastructure. For example, WebDAV defined 7 new methods and RFC 5789 specified the HTTP PATCH method.
HTTP Method | RFC | Request Has Body | Response Has Body | Safe | Idempotent | Cacheable] |
---|---|---|---|---|---|---|
GET | RFC 7231 | No | Yes | Yes | Yes | Yes |
HEAD | RFC 7231 | No | No | Yes | Yes | Yes |
POST | RFC 7231 | Yes | Yes | No | No | Yes |
PUT | RFC 7231 | Yes | Yes | No | Yes | No |
DELETE | RFC 7231 | No | Yes | No | Yes | No |
CONNECT | RFC 7231 | Yes | Yes | No | No | No |
OPTIONS | RFC 7231 | No | Yes | Yes | Yes | No |
TRACE | RFC 7231 | No | Yes | Yes | Yes | No |
PATCH | RFC 5789 | Yes | Yes | No | No | Yes |
HTTP verbs are:
We think of them as mapping to the acronym, CRUD (Create-Read-Update-Delete).)