2. Sending Requests & Body Types

The core action inside Postman is constructing and sending HTTP requests to API servers. An HTTP request consists of a **Method**, a **URL (Endpoint)**, **Headers**, and optionally a **Body (Payload)**.

HTTP Methods Supported by Postman

Postman provides a dropdown list matching all valid HTTP request verbs. The most common are:

  • GET: Retrieve data from a server (e.g. fetching a list of users). Does not have a request body.
  • POST: Send data to a server to create a new resource (e.g. creating a new user profile).
  • PUT: Replace an existing resource entirely with new details.
  • PATCH: Apply partial updates to an existing resource.
  • DELETE: Remove a resource from the server.

Request Parameters & Headers

When building requests, Postman segments them into easy-to-use tabs:

  1. Params (Query Parameters): Key-value pairs appended to the end of a URL after a question mark (e.g., https://api.com/users?status=active&page=2). Postman breaks these down into a visual grid for easy editing.
  2. Headers: Custom metadata passed along with the request. Crucial headers include:
    • Content-Type: Instructs the server what format the payload is in (e.g., application/json).
    • Authorization: Holds secure tokens or keys to prove identity.
    • Accept: Tells the server what format the client wants back.

Mastering Request Body Types

When sending data via POST, PUT, or PATCH, you choose how that payload is formatted under the **Body** tab:

Body TypeHow it worksCommon Use Case
noneNo payload is sent. Standard for GET and DELETE requests.Retrieving list records.
form-dataSends key-value pairs. Supports uploading physical files (binary) as values.Uploading profile images, documents, or mixed text and files.
x-www-form-urlencodedEncodes values into an URL-like format (e.g., `name=John&age=30`). Doesn't support files.Standard web forms and OAuth authorization token exchanges.
rawPlain text payload. You select the formatting standard: JSON, XML, HTML, Javascript, or Plain Text.Sending JSON objects (e.g. `{"id": 1, "title": "Postman"}`) to REST APIs. (Most Popular)
binarySends a single file raw without key headers. Useful for pure file streaming.Direct image or PDF processing endpoints.

Step-by-Step: Sending your First Request

Let’s execute an HTTP GET request against a public test API:

  1. Open Postman, click the + button to open a new tab.
  2. Select the method as GET in the dropdown.
  3. Paste this test URL: https://jsonplaceholder.typicode.com/posts/1
  4. Click the blue Send button.
  5. Observe the response pane below: You will see a `200 OK` status, latency time in milliseconds, and the corresponding JSON payload containing a mock post object!
Pro Tip: When using the **raw** body type with **JSON** format, Postman automatically appends the Content-Type: application/json header to your request behind the scenes, saving you manual configuration time!