27. Methods
GET: Requests a representation of the specified resource
POST: Requests that the server accept the entity enclosed in the request as a new
subordinate of the web resource identified by the URI
PUT: Requests that the enclosed entity be stored under the supplied URI
PATCH: Apply partial modifications to a resource
DELETE: Deletes the specified resource
HEAD: Asks for the response identical to the one that would correspond to a GET
request, but without the response body
OPTIONS: Returns the HTTP methods that the server supports for the specified URL
36. RPC
What to do?
In the body
With what?
In the body
POST /rpc HTTP/1.1
Host: www.upcdatabase.com
User-Agent: XMLRPC::Client (Ruby
1.8.4)
Content-Type: text/xml; charset=utf-8
Content-Length: 158
Connection: keep-alive
<?xml version="1.0" ?>
<methodCall>
<methodName>lookupUPC</methodNa
me>
...
</methodCall>
37. REST
What to do?
In the HTTP method
With what?
In the path
GET /hello.txt HTTP/1.1
Host: www.example.com
38. REST-RPC Hybrid
What to do?
In the path
With what?
In the path
GET services/rest?api_key=xxx&method=flickr.photos.search&tags=penguin
HTTP/1.1
Host: www.flickr.com