Which HTTP method is used for retrieving data from a server?

2025

Which HTTP method is used for retrieving data from a server?

  1. A.

    GET

  2. B.

    POST

  3. C.

    PUT

  4. D.

    DELETE

Attempted by 25 students.

Show answer & explanation

Correct answer: A

HTTP defines a small set of standard request methods, each signalling the client's intent toward a server resource: some methods only read a resource without changing it, while others create, replace, or remove data. A method classified as safe and idempotent -- meaning it is not defined to request any change to server state, and repeating it has the same intended effect as making it once -- is the one reserved specifically for reading data.

Retrieving data from a server is exactly that read-only intent, so among the four listed methods, the one to look for is the method defined purely to fetch a resource's current representation, without requesting any creation or modification of it.

  • POST carries a request body meant to submit new data to the server for processing or to create a resource, so it sends data to the server rather than fetching data from it.

  • PUT carries a request body meant to replace an existing resource at a known address -- an update action, not a read action.

  • DELETE removes a specified resource from the server -- a removal action, the opposite of reading one.

GET is therefore the method whose entire defined purpose is to retrieve data from a server without altering it.

Explore the full course: Rssb Basic Computer Instructor

Loading lesson…