CURL
The CURL component is used to display a cURL command for making HTTP requests.
import { CURL } from "~/components";curl https://httpbin.org/anything \  --request POST \  --json '{    "key": "value"  }'curl https://httpbin.org/anything \  --request POST \  --form "key=value"import { CURL } from "~/components";
<CURL  url="https://httpbin.org/anything"  method="POST"  json={{    key: "value",  }}  code={{    mark: "value"  }}/>
<CURL  url="https://httpbin.org/anything"  method="POST"  form={{    key: "value",  }}  code={{    mark: "value"  }}/>required
type: string
The URL to make the request to.
type: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "OPTIONS" | "PATCH"
default: "GET"
The HTTP method to use for the request.
type: Record<string, string>
The headers to include in the request.
type: Record<string, any> | Record<string, any>[]
JSON data to include in the request.
type: Record<string, any>
The FormData payload to send.
type: object
An object of Expressive Code props, the following props are available:
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark