跳转到正文
curl

curl Converter

Convert curl -X/-H/-d into fetch and axios snippets.

在浏览器内运行 — 数据不会离开您的设备

// fetch
fetch('https://api.example.com/v1/items', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer token'
  },
  body: '{"name":"toco.tools"}'
})

// axios
axios({
  method: 'post',
  url: 'https://api.example.com/v1/items',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer token'
  },
  data: '{"name":"toco.tools"}'
})

关于curl Converter

Convert copied curl commands into fetch() and axios snippets. Everything runs in your browser.

使用方法

  1. Paste a curl command
  2. Review generated code
  3. Copy

常见问题

Free?

Yes.

Uploaded?

No.