Module 03-01 HTTP and Web APIs Flashcards
What does URL stand for?
Uniform Resource Location
What determines how your browser should communication with a web server and what are the two most common examples?
The Protocol. HTTP (Hypertext Transfer Protocol) and HTTPS (* Secure)
What is www?
A subdomain
What is the .com, .net, etc.
TLD (Top Level Domain)
What is always needed but rarely seen after the TLD?
A port. HTTP defaults to port 80, HTTPS defaults to port 443.
/directory/index.html and /products/traffic-cones are examples of what?
Path
What is located at a path?
A resource
What are Query string parameters?
key and value pair(s) after a question mark in a URL i.e. google.com/seach?q=cats has the Query string parameters q and cats, searching for the value cats with key q.
What does a DNS server do?
It translates domains to IP addresses, like a phone book for websites
What elements does an HTTP request message contain?
- An HTTP method like GET, POST, HEAD, etc.
- The path to the resource that the client wants to interact with
- Headers, which contain information about the request, such as the format of data
- A message body
What elements does an HTTP response message contain?
- A status code that indicates success, error, or redirects
- Response headers containing information like the format of data or encoding information
- A message body
Is HTTP stateless?
Yes. There is no relationship made between two requests sent to the server, and the server doesn’t assume any two requests are related. Each request must contain enough information on its own for the server to fulfill the request.
What does the GET method do?
Requests data from the specified resource
What does the POST method do?
Submits data to the specified resource
What does the PUT method do?
Replaces all current representations of the target resource with the request payload. Updates existing data but creates data if it doesn’t exist.