The HTTP Request block

HTTP Request block

The HTTP Request block runs an HTTP request that you select from a collection and sends the result from its output port.

Input

Send - If you connect another block to this input port, that block triggers the HTTP Request block to run. This connection is optional. The HTTP Request block will run when the flow runs, even if this port isn't connected to another block.

Outputs

Success - Sends the response of a successful API request. To succeed, a request must return a 2xx HTTP status code and pass all of its tests.

Fail - Sends the response of an unsuccessful API request. A request will fail if it returns an HTTP status code other than 2xx or if any of its tests fail. If your request is returning a 2xx HTTP status code but failing a test, you might want to disregard the test temporarily. In this case, you can connect a block to the Fail output and that block will receive the data returned by the request.

Setup

Find or create new request - Select this dropdown list to see all the collections in your workspace. Select a collection, then select a request or Create a new request. If there are no collections in the workspace, some introductory requests will appear that you can choose from to get started.

Variables - If the selected request has one or more variables, they'll be listed here. You can assign a value to a variable by connecting another block's output port to the variable's input port. You can also assign a value to a variable by inserting a data block with Add icon Add data blocks. If your request uses environment variables, you can select the environment from the Add environment dropdown list.

Create a new request

To create new and edit existing requests, you can use the Postman Flows request editor that's built into the HTTP Request block. To create a request in the HTTP Request block, do the following:

  1. Select Find or create new request. The collections in your workspace appear in a dropdown list.

  2. Select a collection and select Create a new request. If you don't have any collections, select Create a new request. The Postman Flows request editor opens.

    Postman Flows request editor
  3. In the request editor, select a method from the dropdown list and enter a URL. Alternatively, you can copy a cURL command from your terminal and paste it here. Besides the URL, this add the parameters, headers, and body specified in your cURL command.

  4. (Optional) Select and edit the request's name.

  5. (Optional) Select and edit the request's parameters, headers, and body.

  6. Select Save.

Specify how to parse the response

The HTTP Request block can parse its response as JSON, XML, HTML, or text.

To choose how to parse the response, do the following:

  1. Select the HTTP Request block, then select Additional Settings Additional Settings.

  2. Select Parse Response Parse Response.

  3. Select a format from the dropdown list. You can also select Auto to let the HTTP Request block decide how to parse the response. The default setting is Auto.

The Select and Evaluate blocks are often connected to the HTTP Request block. The Select block is useful for extracting specific information from a response. The Evaluate block is useful for transforming response data and creating conditions to route data in your flow based on a response.

Last modified: 2025/03/19