http messages Flashcards
What is a client?
service requesters; initiate communication sessions with servers, which await incoming requests
i.e., typical web user’s internet-connected devices
What is a server?
providers of a resource or service; share their resources with clients; abstraction
Which HTTP method does a browser issue to a web server when you visit a URL?
HTTP GET request: requests a representation of the specified resource; requests using GET should only be used to request data (they shouldn’t include data)
What three things are on the start-line of an HTTP request message?
- http method: describes action to be performed
- request target: the URL or path to get data from
- http version: defines the structure of message and of the requested response
What three things are on the start-line of an HTTP response message?
- protocol version: usually HTTP/1.1
- status code: indicating success/failure of request
- status text: description of the status code
above all, something like this:
HTTP/1.1 404 Not Found
What are HTTP headers?
let the client and the server pass additional information with an HTTP request or response like html headers
a case-insensitive string followed by a colon (‘:’) and a value whose structure depends upon the header
Where would you go if you wanted to learn more about a specific HTTP Header?
mdn or Internet Assigned Numbers Authority
Is a body required for a valid HTTP request or response message?
no
requests fetching resources, like GET, HEAD, DELETE, or OPTIONS, usually don’t need one. Some requests send data to the server in order to update it: as often the case with POST requests (containing HTML form data)
client-server examples
email, network printing, and the www
http messages types
- requests sent by the client to trigger an action on the server
- responses, the answer from the server
ultimately: HTTP messages are the key in using HTTP
http requests and responses are composed of?
- start-line: the requests and the success/failure of the request (always a single line)
- optional: http headers: specifying requests or describing the body of included in the message
- blank line for all the meta-info that has been requested was sent
- optional: body: data associated with the request or document associated with a response
http acronym meaning
HyperText Transfer Protocol: allows the fetching of resources; defines a language for clients and servers to speak to each other.
http messages recap
….
What is a client?
service requesters
What is a server?
providers of a resource or service