> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# The HTTP Request block

The **HTTP Request** block runs an HTTP request that you select from a collection. It sends the response and any test results from one of its output ports.

The **HTTP Request** block consumes one credit each time it runs. To learn more, see [How Flows consume credits](/docs/billing/flows-usage/#how-flows-consume-credits).

## 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.

**Variables** - If the selected request obtains values from variables, those variables will be listed here. Requests can use variables to set values for query parameters and for elements of the request body.

When a request is created in a collection, if a query parameter's value was set without using a variable:

* No variable will be listed for it in the **HTTP Request** block.

* There is no way to override its value from a flow.

To learn how to set or override these variable values, see [Setup](#setup).

## Outputs

**Success** - Sends the response of a successful API request and any passed or failed test results. To succeed, a request must return a 2xx HTTP status code.

**Fail** - Sends the response of an unsuccessful API request and any passed or failed test results. A request will fail if it returns an HTTP status code other than 2xx.

## Setup

**Find or create new request** - Click to open a dropdown list showing all the collections in your workspace. Select a collection, then select a request or **Create a new request**.

**Variables** - To assign a value to a request's variable, use either of the following methods:

* Connect another block's output port to the variable's input port.

* Click <img alt="Add icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-action-add-stroke.svg#icon" width="20px" /> **Add data blocks** to [Insert a data block](/docs/postman-flows/reference/blocks/overview/#insert-data-blocks-into-other-blocks) inline.

You can also use these methods to assign values to [environment variables](/docs/use/send-requests/variables/managing-environments/) or [dynamic variables](/docs/tests-and-scripts/write-scripts/variables-list/) used in a request. If your request uses [dynamic variables](/docs/tests-and-scripts/write-scripts/variables-list/), the dynamic variables will work as usual in your flow. If you want to override their values, use one of the value assignment methods to assign the values you prefer.

### Additional Settings

**Parse Response** - Specify how the **HTTP Request** block parses the response it sends. Select from the following options:

* Auto
* JSON
* XML
* HTML
* Text

**Allow scripts to update environment variables** - Requests can change [environment variables'](/docs/use/send-requests/variables/environment-variables/) values with [scripts](/docs/tests-and-scripts/write-scripts/intro-to-scripts/). When this toggle is on (default), if pre-request or post-response scripts change an environment variable's value, the new value persists after the **HTTP Request** block completes its task. Turn this toggle off to prevent those changes from persisting after each time the block completes its task.

**Ignore test failures when routing** - When this toggle is on (default), the **HTTP Request** block routes any response with a `2xx` code through the **Success** output port even if it includes failed tests. Turn off the toggle to route responses through the **Fail** output port if any tests fail.

### Update environment variables with scripts

Requests can change [environment variables'](/docs/use/send-requests/variables/environment-variables/) values with [scripts](/docs/tests-and-scripts/write-scripts/intro-to-scripts/). You can configure the [**HTTP Request**](/docs/postman-flows/reference/blocks/http-request/) block so that environment variable values changed by pre-request and post-request scripts persist or reset when the block's run completes. By default, script-changed values persist in new **HTTP Request** blocks. [Deployed flows](/docs/postman-flows/build-flows/structure/actions/) don't support persistent changed values for environment variables.

To turn persistent changes to environment variables on or off, do the following:

1. Click the **HTTP Request** block.

2. Click <img alt="Setting icon" src="https://assets.postman.com/postman-docs/aether-icons/v12/icon-descriptive-setting-stroke.svg#icon" width="20px" /> **Additional Settings**.

3. Next to **Allow persistent changes to environment values**, turn the toggle on or off. <img alt="Delete icon" src="https://assets.postman.com/postman-docs/v11/flows-toggle-off-v11.png#icon" width="20px" /> Left is off, <img alt="Delete icon" src="https://assets.postman.com/postman-docs/v11/flows-toggle-on-v11.png#icon" width="20px" /> right is on.

4. Select a format from the dropdown list.

## Example

To see the **HTTP Request** block in an example flow, check out [Flow Snippets: HTTP Request](https://www.postman.com/postman/flows-snippets/flow/6841fe03a0431d0031dfd5f2).

## Related blocks

The [**Select**](/docs/postman-flows/reference/blocks/select/) and [**Evaluate**](/docs/postman-flows/reference/blocks/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.

## Related pages

For tutorials that use the **HTTP Request** block, see the following:

* [Automate repetitive tasks using Postman Flows](/docs/postman-flows/tutorials/advanced/automate-repetitive-tasks/)
* [Create a list-based loop with the For block](/docs/postman-flows/tutorials/beginner/create-list-based-loop/)
* [Create a dashboard using Postman Flows](/docs/postman-flows/tutorials/advanced/create-a-dashboard-in-flows/)
* [Send information from one system to another using Postman Flows](/docs/postman-flows/tutorials/advanced/send-information-from-one-system-to-another/)
* [Send a request with the HTTP Request block](/docs/postman-flows/tutorials/beginner/send-request/)
* [Run requests in sequence using Postman Flows](/docs/postman-flows/tutorials/advanced/run-requests-in-sequence/)