APIs & HTTP

Test and organize APIs

Collections, environments, authentication, .http files and Postman import.

In this guidePrepare a repeatable requestSeparate variables from secretsImport with context

Prepare a repeatable request#

Parameters and headers can be enabled individually. Authentication can be inherited from a folder or collection. Saving a request does not send it, and responses are not automatically added to the collection.

  1. Open HTTP Client and create a request in a project collection.
  2. Choose the method and URL, then add parameters, headers, a body and authentication.
  3. Use environment variables such as {{baseUrl}} to separate development, testing and production.
  4. Press Send and inspect status, timings, headers and the response body; Cancel interrupts the request.
HTTP client: requests and responses beside the project.Code Weaver · Windows beta

Separate variables from secrets#

Session variables stay in memory. Values and credentials written directly into a request or collection are retained when you explicitly save it. Use variables to avoid saving tokens as collection content.

.http files keep requests beside your sources. ### separates calls, and Ctrl+Enter runs the request at the cursor or one complete selected request.

HTTP · Example
@baseUrl = http://localhost:3000

### Products
GET {{baseUrl}}/api/products
Accept: application/json

Import with context#

Import Postman prepares a preview for Collection v2 and v2.1. Review the hierarchy, variables, authentication and notes before confirming. Import adds the collection without sending requests or automatically reading imported file paths.

Postman pre-request and test scripts are retained as text but are not executed. Dedicated tools also include WebSocket, SSE and GraphQL; authentication and certificates need configuration appropriate to the service.

Open original image ↗