Mime Types
From : http://www.xml.com/pub/a/2005/06/08/restful.html
"One of the benefits of using HTTP correctly is that we can dispatch on a whole range of things. To make the discussion more concrete, let's look at an example HTTP request:
GET / HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: Mozilla/5.0 (...) Gecko/20050511 Firefox/1.0.4
Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9,
text/plain;q=0.8, image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
There are three items of interest here. First, the HTTP request method is
GET. Second, the URI is carried in two locations. The path and query parameters are on the first line of the request. The remainder of the URI, the domain name of the server, is carried in theHostheader. Third, the media type is carried in theAcceptheader because this is aGETrequest. For otherPOSTorPUTrequests, theContent-Typeheader in the request carries the media type of the entity body."

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home