HTTP Flashcards
What is a client?
service requesters. Initiate communication sessions with servers.
Can be a piece of hardware or software.
What is a server?
Provider of a resource(data) or service.
Await incoming requests from clients.
Which HTTP method does a browser issue to a web server when you visit a URL?
GET - indicates that a resource should be fetched.
What 3 things are on the start-line of an HTTP request message?
- HTTP method - describes the action to be performed.
- Request target (usually a URL)
- HTTP version - defines the structure of the remaining message.
What 3 things are on the start-line of an HTTP response message?
- Protocol version - usually HTTP/1.1
- Status code- indicating success or failure of the request.
- Status text - textual description of the status code to help a human understand the HTTP message.
What are HTTP Headers?
meta data about the request or response
Where would you go if you wanted to learn more about a specific HTTP header?
mdn
Is a body required for a valid HTTP request or response message?
no
How is data exchanged between a server and a client?
HTTP messages
What is a host?
A host is a piece of hardware that runs a server and/or client program
What does fetch return?
A PROMISE that resolves to a response object
What is the default request method used by fetch()?
GET
How do you specify the request method (GET, POST, etc) when calling fetch?
using the “method” property of the object that is the second argument in the fetch function
What is HTTPs?
Hypertext transfer protocol secure
An internet communication protocol that protects the integrity and confidentiality of data between a user’s computer and the website being visited
What are http messages?
Are either a request or response and are ways for the client and server to communicate