# vercel httpstat

> **⚠️ Warning:** The `vercel httpstat` command is currently in beta. Features and behavior may change.

The `vercel httpstat` command works like `httpstat`, but automatically handles deployment protection bypass tokens for you. It provides visualization of HTTP timing statistics, showing how long each phase of an HTTP request takes. When your project has [Deployment Protection](/docs/security/deployment-protection) enabled, this command lets you test protected deployments without manually managing bypass secrets.

The command runs the `httpstat` tool with the same arguments you provide, but adds an [`x-vercel-protection-bypass`](/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation#using-protection-bypass-for-automation) header with a valid token. This makes it simple to measure response times, analyze performance bottlenecks, or debug latency issues on protected deployments.

> **💡 Note:** This command is available in Vercel CLI v48.9.0 and later. If you're using an older version, see [Updating Vercel CLI](/docs/cli#updating-vercel-cli).

## Usage

```bash filename="terminal"
vercel httpstat [path]
```

## Examples

### Basic timing analysis

Get timing statistics for your production deployment:

```bash filename="terminal"
vercel httpstat /api/hello
```

### POST request timing

Analyze timing for a POST request with JSON data:

```bash filename="terminal"
vercel httpstat /api/users -X POST -H "Content-Type: application/json" -d '{"name":"John"}'
```

### Specific deployment timing

Test timing for a specific deployment by its URL:

```bash filename="terminal"
vercel httpstat /api/status --deployment https://my-app-abc123.vercel.app
```

### Multiple requests

Run multiple requests to get average timing statistics:

```bash filename="terminal"
vercel httpstat /api/data -n 10
```

## How it works

When you run `vercel httpstat`:

1. The CLI finds your linked project (or you can specify one with [`--scope`](/docs/cli/global-options#scope))
2. It gets the latest production deployment URL (or uses the deployment you specified)
3. It retrieves or generates a deployment protection bypass token
4. It runs the `httpstat` tool with the bypass token in the `x-vercel-protection-bypass` header
5. The tool displays a visual breakdown of request timing phases: DNS lookup, TCP connection, TLS handshake, server processing, and content transfer

The command requires `httpstat` to be installed on your system.

## Unique options

These are options that only apply to the `vercel httpstat` command.

### Deployment

The `--deployment` option, shorthand `-d`, lets you specify a deployment URL to request instead of using the production deployment.

```bash filename="terminal"
vercel httpstat /api/hello --deployment https://my-app-abc123.vercel.app
```

### Protection Bypass

The `--protection-bypass` option, shorthand `-b`, lets you provide your own deployment protection bypass secret instead of automatically generating one. This is useful when you already have a bypass secret configured.

```bash filename="terminal"
vercel httpstat /api/hello --protection-bypass your-secret-here
```

You can also use the [`VERCEL_AUTOMATION_BYPASS_SECRET`](/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation#using-protection-bypass-for-automation) environment variable:

```bash filename="terminal"
export VERCEL_AUTOMATION_BYPASS_SECRET=your-secret-here
vercel httpstat /api/hello
```

## Understanding the output

The `httpstat` tool displays timing information in a visual format:

- **DNS Lookup**: Time to resolve the domain name
- **TCP Connection**: Time to establish a TCP connection
- **TLS Handshake**: Time to complete the SSL/TLS handshake (for HTTPS)
- **Server Processing**: Time for the server to generate the response
- **Content Transfer**: Time to download the response body

Each phase is color-coded and displayed with its duration in milliseconds, helping you identify which part of the request is taking the most time.

## Troubleshooting

### httpstat command not found

Make sure `httpstat` is installed on your system:

```bash filename="terminal"