HTTP Flashcards
What is a client?
A client is a device or program that requests content or service from a server over a network
the client sends a request over the network and the server returns a response
What is a server?
A server is a device or program that runs one or more programs and shares their resources with the clients
receives the request and send a response
ex computer server gives you data, whether its an html page, json data, xml, images, etc.. it serves some kind of data to you
the client sends a request over the network and the server returns a response
Which HTTP method does a browser issue to a web server when you visit a URL?
GET request
whenever you go to a URL on a browser, it is always a GET request
What is on the first line of an HTTP request message?
HTTP method, request target, HTTP version
request target is usually a URL or absolute path
What is on the first line of an HTTP response message?
protocol version, status code, status text
status text - a brief info of the status code to help a human understand the HTTP message
common status codes are 200, 400, 302
What are HTTP headers?
a place to store additional information about the request and/or response
HTTP headers let the client and the server pass additional information with an HTTP request or response
they are key value pairs
Is a body required for a valid HTTP message?
no
Where would you go if you wanted to learn more about a specific HTTP Header?
IANA registry