Appendix C. HTTP Methods
HTTP’s uniform interface consists of the
TRACE methods. This appendix provides a short primer on using
these HTTP methods, listed in the order used by RFC 2616.
Use this method to find the list of HTTP methods supported by any resource or to ping the server.
Request: Headers but no body.
Response: Headers but no body by default. The server may provide a description of the resource in the body.
# 1. Request to find methods supported by a resource OPTIONS /movie/gone_with_the_wind HTTP/1.1 Host: www.example.org # Response with the methods supported by the resource HTTP/1.1 204 No Content Allow: HEAD, GET, OPTIONS, PUT, DELETE # 2. Request to ping the server or find the version of HTTP supported OPTIONS * HTTP/1.1 Host: www.example.org # Response HTTP/1.1 204 No Content
Use this method to retrieve a representation of a resource.
Request: Headers but no body specified by HTTP 1.1.
Response: A representation of the resource
at the request URI usually with a body. Response headers such as
correspond to the representation in the response.
# A request to get a representation of a resource GET /tx/1234 HTTP/1.1 Host: www.example.org # Response HTTP/1.1 200 OK Content-Type: application/xml;charset=UTF-8 Content-Length: xxx <status> ... </status>
Use this method to retrieve the same headers as that of a
GET response but without ...