HTTP Protocol Fundamentals
Understanding HTTP methods, status codes, headers, and request-response cycle in web communications
- Category
- Web Development
- Level
- basic
- Languages
- en → en
- Cards
- 44
- Markdown
- HTTP Protocol Fundamentals (.md)
Flashcards (44)
| # | Front (Term / Question) | Back (Definition / Answer) | Example | Multiple-Choice Options |
|---|---|---|---|---|
| 1 | What does the POST method do? | The POST method sends data to a server to create or update a resource. | ||
| 2 | What is the role of the HTTP status code 204? | A 204 status code indicates that the server successfully processed the request but is not returning any content. | ||
| 3 | What is the role of the HTTP status code 408? | A 408 status code indicates that the server timed out waiting for the client's request. | ||
| 4 | What is the 'User-Agent' header? | The 'User-Agent' header identifies the client software making the request to the server. | ||
| 5 | What is the purpose of the PUT method? | The PUT method updates an existing resource or creates a new resource if it does not exist. | ||
| 6 | What is the purpose of the 'Origin' header? | The 'Origin' header indicates the origin of the request, which is useful for CORS (Cross-Origin Resource Sharing) policies. | ||
| 7 | What is the purpose of the 'Authorization' header? | The 'Authorization' header contains credentials for authenticating the client with the server. | ||
| 8 | What does a 404 status code indicate? | A 404 status code indicates that the requested resource could not be found on the server. | ||
| 9 | What is an HTTP status code? | An HTTP status code is a three-digit number returned by a server to indicate the outcome of a client's request. | ||
| 10 | What is a cookie in HTTP? | A cookie is a small piece of data stored on the client side that is sent to the server with HTTP requests. | ||
| 11 | What is the purpose of the 'Host' header? | The 'Host' header specifies the domain name of the server and the port number on which the server is listening. | ||
| 12 | What does the DELETE method do? | The DELETE method removes a specified resource from the server. | ||
| 13 | What is the purpose of the 'If-Modified-Since' header? | The 'If-Modified-Since' header allows a client to request a resource only if it has been modified since a specified date. | ||
| 14 | What is the purpose of the 'Connection' header? | The 'Connection' header controls whether the network connection stays open after the current transaction finishes. | ||
| 15 | What does HTTP stand for? | HTTP stands for Hypertext Transfer Protocol. | ||
| 16 | What is the purpose of the 'Accept-Encoding' header? | The 'Accept-Encoding' header specifies the content encoding (like gzip) that the client can understand. | ||
| 17 | What is a URI? | A URI (Uniform Resource Identifier) is a string that identifies a resource on the internet. | ||
| 18 | What does a 500 status code indicate? | A 500 status code indicates an internal server error occurred while processing the request. | ||
| 19 | What is the purpose of HTTP headers? | HTTP headers provide additional information about the request or response, such as content type, length, and caching policies. | ||
| 20 | What is the 'Content-Type' header used for? | The 'Content-Type' header specifies the media type of the resource being sent or requested. | ||
| 21 | What is the purpose of the 'Content-Disposition' header? | The 'Content-Disposition' header indicates if the content should be displayed inline in the browser or treated as an attachment. | ||
| 22 | What are HTTP methods? | HTTP methods are commands that indicate the desired action to be performed on a resource, such as GET, POST, PUT, DELETE. | ||
| 23 | What is a client in the context of HTTP? | A client is typically a web browser or application that sends requests to a server. | ||
| 24 | What is the difference between a GET request and a POST request? | A GET request retrieves data without modifying it, while a POST request sends data to the server to create or update a resource. | ||
| 25 | What is a redirect in HTTP? | A redirect is an HTTP response that instructs the client to request a different URL. | ||
| 26 | What is the role of the HTTP status code 301? | A 301 status code indicates that a resource has been permanently moved to a new URL. | ||
| 27 | What is the purpose of the 'Content-Length' header? | The 'Content-Length' header indicates the size of the body of the request or response in bytes. | ||
| 28 | What is a 403 status code? | A 403 status code indicates that the server understands the request but refuses to authorize it. | ||
| 29 | What is the difference between HTTP and HTTPS? | HTTPS is HTTP with an added layer of security using SSL/TLS to encrypt the data transmitted. | ||
| 30 | What is the HTTP request-response cycle? | The HTTP request-response cycle is the process where a client sends a request to a server, and the server processes it and sends back a response. | ||
| 31 | What is a server in the context of HTTP? | A server is a system that hosts web applications and responds to client requests. | ||
| 32 | What is the role of the HTTP status code 302? | A 302 status code indicates that a resource has been temporarily moved to a different URL. | ||
| 33 | What does a 200 status code indicate? | A 200 status code indicates that the request was successful and the server returned the requested data. | ||
| 34 | What is the role of the HTTP status code 429? | A 429 status code indicates that the user has sent too many requests in a given amount of time. | ||
| 35 | What is the purpose of the 'Accept' header? | The 'Accept' header indicates the media types that the client is willing to receive from the server. | ||
| 36 | What is the difference between persistent and non-persistent connections? | Persistent connections allow multiple requests and responses to be sent over a single connection, while non-persistent connections close after each request/response pair. | ||
| 37 | What does the GET method do? | The GET method retrieves data from a server without modifying it. | ||
| 38 | What is the primary purpose of HTTP? | The primary purpose of HTTP is to facilitate communication between clients and servers on the web. | ||
| 39 | What is a web API? | A web API is an interface that allows different software applications to communicate over the web using HTTP. | ||
| 40 | What is the difference between HTTP/1.1 and HTTP/2? | HTTP/2 introduces multiplexing, header compression, and binary framing, improving performance over HTTP/1.1. | ||
| 41 | What is the role of the HTTP status code 511? | A 511 status code indicates that the client needs to authenticate to gain network access. | ||
| 42 | What is the purpose of the 'Cache-Control' header? | The 'Cache-Control' header specifies directives for caching mechanisms in both requests and responses. | ||
| 43 | What is the purpose of the 'ETag' header? | The 'ETag' header provides a unique identifier for a specific version of a resource, allowing for efficient caching. | ||
| 44 | What is the purpose of the 'Referer' header? | The 'Referer' header indicates the URL of the webpage that linked to the resource being requested. |