首页/开发工具/Curl 转代码开发Curl 转代码将 cURL 命令转换为 JavaScript fetch 代码。工作区本地处理复制结果cURL 命令curl -X POST https://api.example.com/data -H "Content-Type: application/json" -d "{"name":"test"}"fetch() 代码const response = await fetch("https://api.example.com/data", { method: "POST", headers: { "Content-Type": "application/json", }, body: "{\"name\":\"test\"}", }); const data = await response.text(); console.log(response.status, data);数据不会离开你的设备,不会被上传或存储。常见问题关于工具用途、用法与隐私说明Curl 转代码 是什么?+Curl 转代码是面向开发者的在线工具,在浏览器中完成数据处理,无需安装插件。如何使用Curl 转代码?+数据会上传到服务器吗?+