---
title: CURL
description: Display formatted curl command examples.
image: https://edgetunnel-b2h.pages.dev/cf-twitter-card.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/style-guide/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# CURL

The `CURL` component is used `40` times on `13` pages. 

See all examples of pages that use CURL

Used **40** times. 

**Pages**

* [/browser-run/cdp/session-management/](https://edgetunnel-b2h.pages.dev/browser-run/cdp/session-management/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/browser-run/cdp/session-management.mdx)
* [/browser-run/features/live-view/](https://edgetunnel-b2h.pages.dev/browser-run/features/live-view/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/browser-run/features/live-view.mdx)
* [/cloudflare-one/access-controls/ai-controls/mcp-portals/](https://edgetunnel-b2h.pages.dev/cloudflare-one/access-controls/ai-controls/mcp-portals/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/cloudflare-one/access-controls/ai-controls/mcp-portals.mdx)
* [/cloudflare-one/integrations/identity-providers/idp-federation/](https://edgetunnel-b2h.pages.dev/cloudflare-one/integrations/identity-providers/idp-federation/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/cloudflare-one/integrations/identity-providers/idp-federation.mdx)
* [/data-localization/regional-services/ip-bindings/](https://edgetunnel-b2h.pages.dev/data-localization/regional-services/ip-bindings/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/data-localization/regional-services/ip-bindings.mdx)
* [/magic-transit/network-health/run-endpoint-health-checks/](https://edgetunnel-b2h.pages.dev/magic-transit/network-health/run-endpoint-health-checks/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/magic-transit/network-health/run-endpoint-health-checks.mdx)
* [/speed/optimization/content/shared-dictionaries/](https://edgetunnel-b2h.pages.dev/speed/optimization/content/shared-dictionaries/)\- [Source ](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/docs/speed/optimization/content/shared-dictionaries.mdx)

**Partials**

* [src/content/partials/networking-services/cloudflare-wan/custom-ike-id-ipsec.mdx](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/networking-services/cloudflare-wan/custom-ike-id-ipsec.mdx)
* [src/content/partials/networking-services/mconn/network-options/app-aware-policies/breakout-prioritized.mdx](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/networking-services/mconn/network-options/app-aware-policies/breakout-prioritized.mdx)
* [src/content/partials/networking-services/mconn/network-options/app-aware-policies/netflow.mdx](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/networking-services/mconn/network-options/app-aware-policies/netflow.mdx)
* [src/content/partials/networking-services/routing/configure-tunnels.mdx](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/networking-services/routing/configure-tunnels.mdx)
* [src/content/partials/networking-services/tunnel-health/update-tunnel-health-checks-frequency.mdx](https://github.com/cloudflare/cloudflare-docs/blob/production/src/content/partials/networking-services/tunnel-health/update-tunnel-health-checks-frequency.mdx)

The `CURL` component is used to display a cURL command for making HTTP requests.

## Import

```mdx
import { CURL } from "~/components";
```

## Usage

```mdx
import { CURL } from "~/components";


<CURL
  url="https://httpbin.org/anything"
  method="POST"
  json={{
    key: "va'l'ue",
  }}
  query={{
    foo: "bar",
    bar: ["baz", "qux"],
  }}
  code={{
    mark: "value",
  }}
/>


<CURL
  url="https://httpbin.org/anything"
  method="POST"
  form={{
    key: "value",
  }}
  code={{
    mark: "value",
  }}
/>
```

## `<CURL>` Props

### `url`

**required**

**type:** `string`

The URL to make the request to.

### `method`

**type:** `"GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "OPTIONS" | "PATCH"`

**default:** `"GET"`

The HTTP method to use for the request.

### `headers`

**type:** `Record<string, string>`

The headers to include in the request.

### `json`

**type:** `Record<string, any> | Record<string, any>[]`

JSON data to include in the request.

### `form`

**type:** `Record<string, any>`

The FormData payload to send.

### `query`

**type:** `Record<string, string | string[]>`

URL query parameters to append to the request URL.

### `code`

**type:** `object`

An object of Expressive Code props, the following props are available:

* [Base Props ↗](https://expressive-code.com/key-features/code-component/#available-props)
* [Line Marker Props ↗](https://expressive-code.com/key-features/text-markers/#props)
* [Collapsible Sections Props ↗](https://expressive-code.com/plugins/collapsible-sections/#props)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://edgetunnel-b2h.pages.dev/style-guide/components/curl/#page","headline":"CURL · Cloudflare Style Guide","description":"Display formatted curl command examples.","url":"https://edgetunnel-b2h.pages.dev/style-guide/components/curl/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/cf-twitter-card.png","dateModified":"2026-06-18","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/style-guide/","name":"Style Guide"}},{"@type":"ListItem","position":3,"item":{"@id":"/style-guide/components/","name":"Components"}},{"@type":"ListItem","position":4,"item":{"@id":"/style-guide/components/curl/","name":"CURL"}}]}
```
