Curl to Axios Converter
Generate Axios HTTP client code from curl
Paste curl and get a single axios config object with method, url, headers, data, and auth when applicable.
From the blog
Idempotent Receiver Pattern in Distributed Systems
Read
Why clients retry, how duplicate requests sneak in, and how to build a receiver that processes the same request twice without breaking anything
Supports multi-line commands with \ line continuations. Conversion runs as you type.
Convert to:
Example curl commands
Supported output targets
| Language | Library | Landing page |
|---|---|---|
| Python | requests or httpx |
curl to Python |
| PHP | curl extension or Guzzle |
curl to PHP |
| Go | net/http |
curl to Go |
| JavaScript | axios |
curl to Axios |
| Java | OkHttp |
curl to Java |
| C# | HttpClient |
curl to C# |
| PowerShell | Invoke-RestMethod |
curl to PowerShell |
Also convert curl to
curl to Axios FAQ
Node or browser?
Output uses require('axios') for Node. In the browser, use import axios from 'axios' instead.
Multipart uploads?
Uses form-data package with fs.createReadStream for -F @file parts.