HTTP Actions Flashcards

1
Q

GET

A

GET is an HTTP method used to request data from a specified resource without modifying it.

Example - A browser sends a GET request to retrieve a webpage’s content, such as GET /home.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

POST

A

POST is an HTTP method used to send data to a server to create or update a resource.

Example - A user submits a form to register on a website, sending a POST request with user details like name and email.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

PUT

A

PUT is an HTTP method used to update or replace an existing resource with new data.

Example - A user updates their profile picture by sending a PUT request with the new image to /profile/picture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

HttpResponseResult

A

HttpResponseResult is an object that encapsulates the outcome of an HTTP request, including status code, headers, and response body.

Example - A HttpResponseResult for a successful request might include a 200 status code and the requested data in the response body.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Void

A

Void refers to an HTTP response with no content, typically used for actions where the server does not need to return data.

Example - A DELETE request that removes a resource may return a 204 No Content status, indicating success with no additional data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HttpResponseMessage

A

HttpResponseMessage represents the response message sent from a server, including status code, headers, and body content.

Example - In a web API, a HttpResponseMessage might contain a 404 status code and an error message if a requested resource is not found.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

IHttpActionResult

A

IHttpActionResult is an interface in ASP.NET Web API that represents the result of an action method, providing a consistent way to return HTTP responses.

Example - A method might return IHttpActionResult like Ok() for a successful response or NotFound() for a 404 error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly