Web Requests - HTTP Methods and Codes Flashcards
What is the purpose of HTTP methods?
To allow the browser to send information, forms, or files to the server.
What does the GET method do?
Requests a specific resource, with additional data passed via query strings.
What is the function of the POST method?
Sends data to the server, handling various types of input.
What does the HEAD method request?
Requests the headers that would be returned if a GET request was made.
What is the purpose of the PUT method?
Creates new resources on the server.
What does the DELETE method do?
Deletes an existing resource on the webserver.
What information does the OPTIONS method return?
Information about the server, such as accepted methods.
What does the PATCH method do?
Applies partial modifications to the resource at the specified location.
What type of request does a 200 OK status code indicate?
A successful request.
What does a 302 Found status code signify?
Redirects the client to another URL.
What does a 400 Bad Request status code indicate?
Encountering malformed requests.
What does a 403 Forbidden status code mean?
Client doesn’t have appropriate access to the resource.
What does a 404 Not Found status code indicate?
Requested resource does not exist on the server.
What does a 500 Internal Server Error status code signify?
The server cannot process the request.
Fill in the blank: The __________ method is commonly used for uploading data to a website.
POST
True or False: HTTP status codes can only indicate success or failure of requests.
False
What are the five types of HTTP response codes?
- 1xx
- 2xx
- 3xx
- 4xx
- 5xx
What is the significance of the 1xx response codes?
Provides information and does not affect processing of the request.
What is commonly relied upon by modern web applications?
GET and POST methods.
What is the role of the PATCH method?
To apply partial modifications to a resource.
What can lead to Denial of Service (DoS) when using the DELETE method?
Deleting critical files on the web server without proper security.
Fill in the blank: The __________ status code is returned on a successful request.
200 OK
What are the two main HTTP methods used in REST APIs?
- PUT
- DELETE