All Exams Test series for 1 year @ ₹349 only
Question

To retrieve the information from Server, which http request type is used?

The correct answer is

GET

Understanding HTTP request types is fundamental to how the web works. When your web browser needs to show you a webpage, or an application needs data from a server, it uses the Hypertext Transfer Protocol (HTTP) to communicate. HTTP defines different methods, or verbs, for performing actions on resources hosted on a server.

Understanding HTTP Request Types for Information Retrieval

Each HTTP request type has a specific purpose. To retrieve information from a server without causing any change on the server's side, a particular type of request is standard practice.

Why GET is Used for Retrieving Information

The GET request type is designed specifically for requesting data from a specified resource. It's considered a safe and idempotent method:

  • Safe: A GET request should not change the state of the server. It is only for querying or retrieving data.
  • Idempotent: Making the same GET request multiple times should have the same effect as making it once (in terms of the resource state on the server).

When you type a URL in your browser or click on a link, your browser typically sends a GET request to fetch the content of that page.

Comparing GET with Other HTTP Request Types

Let's look at the other options and see why they are not primarily used for simple information retrieval in the same way GET is:

  • POST: This method is used to send data to a server to create or update a resource. For example, submitting a form or uploading a file typically uses POST. It can change the server's state and is neither safe nor idempotent.
  • PUT: This method is used to send data to a server to create or replace a resource at a specific URL. If the resource exists, PUT replaces it; if not, it creates it. It changes the server's state and is idempotent but not safe.
  • PATCH: This method is used to apply partial modifications to a resource. Unlike PUT, which replaces the entire resource, PATCH applies incremental changes. It changes the server's state and is neither safe nor necessarily idempotent.

Here is a summary of these common HTTP methods:

HTTP Method Primary Use Safe? Idempotent?
GET Retrieve data Yes Yes
POST Submit data to create/update a resource No No
PUT Create or replace a resource No Yes
PATCH Apply partial modifications to a resource No No (generally)

Based on their definitions and purposes, the GET request type is the standard and appropriate method for retrieving information from a server.

Revision Table: HTTP Request Types

Request Type Action
GET Requests data from a resource.
POST Sends data to create or update a resource.
PUT Creates or replaces a resource.
PATCH Partially updates a resource.

Additional Information: HTTP Concepts

  • Resource: Anything that can be identified by a URI (Uniform Resource Identifier), such as a web page, an image, a video, or a service.
  • URI/URL: A Uniform Resource Identifier (URI) is a sequence of characters that identifies a logical or physical resource. A URL (Uniform Resource Locator) is a type of URI that specifies the means of retrieving a resource, most commonly the address of a web page on the internet.
  • Safe Methods: HTTP methods are safe if they do not change the state of the server. GET, HEAD, OPTIONS, and TRACE are considered safe.
  • Idempotent Methods: An HTTP method is idempotent if making the same request multiple times has the same effect as making it once. PUT and DELETE are typically idempotent. GET, HEAD, OPTIONS, and TRACE are also idempotent. POST and PATCH are generally not idempotent.
Was this answer helpful?

Important Questions from Application Layer Protocols

  1. Which of the following services use TCP?

    i) DHCP               

    ii) SMTP              

    iii) HTTP               

    iv) TFTP

    v) FTP

  2. Which one of the following protocols is used for E-mail services?

  3. LDAP works on the ________ layer of OSI Model

  4. What does PPTP stand for ?

  5. X.25 works on ___________ protocol.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App