Please enable JavaScript.
Coggle requires JavaScript to display documents.
Web Architecture Week 2 Lecture 4 Protocols: HTTP (Response headers…
Web Architecture
Week 2 Lecture 4
Protocols: HTTP
Web protocols
HTTP
This lecture
SOAP
Web services
Anatomy
http://<host><:port></path>?<query>#<fragment>
Versions
Current
HTTP 1.1 2014 update
First
HTTP/0.9 (1991)
Methods
GET
request a representation of a resource
HEAD
request the body-less response from a GET request
POST
request that a representation be accepted as a new subordinate of the specified resource
PUT
uploads a representation of the specified resource
DELETE
Deletes specified resource
Request headers
Accept
specify desired media type of response
Accept-Language
specify desired language of response
Date
date/time at which the message was originated
Host
host and port number of requested resource
If-Match
conditional request
Referer
URI of previously visited resource
User-Agent
identifier string for Web browser or user agent
Status codes
1xx
informational message
2xx
Success
200 OK
The request has succeeded
201 Created
The request has been fulfilled and resulted in a new resource being created
3xx
redirection
300 Multiple choices
Multiple representations of the requested resource exist, and the client is provided with negotiation so that it may select a preferred representation
301 Moved Permanently
The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.
302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests.
4xx
client error
401 Unauthorized
This required user authentication
403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
405 Method Not Allowed
The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow: header containing a list of valid methods for the requested resource.
5xx
server error
Response headers
Allow
lists methods supported by request URI
Content-Language
language of representation
Content-Type
media type of representation
Content-Length
length in bytes of representation
Date
date/time at which the message was originated
ETag
identifier for version of resource (message digest)
Last-Modified
date/time at which representation was last changed
Expires
date/time after which response is considered stale
Content Negotiation
HTTP allows the serving of different representations of a resource based on client preferences
Negotiable content
Media type
Language
In GET different alternatives are presented with q= indicating priority.