工具大全 ToolBox — 免费在线工具箱

200+ 免费在线工具,纯前端本地运行,数据不上传服务器。

i关于本工具

用途说明

HTTP 请求代码生成器面向开发者与测试工程师:粘贴 Chrome DevTools、Postman、Apifox 的 Copy as cURL,在浏览器本地解析为 Method、URL、Query、Headers、Cookies 与 Body,并一键生成 Python requests、JavaScript fetch/axios、Go net/http、Java OkHttp、Rust reqwest 及标准 cURL。敏感 Token 不上传服务器,适合 API 联调、自动化脚本迁移与技术文档多语言示例编写。

使用步骤

  1. 从浏览器网络面板或 Postman 复制 cURL,粘贴到「导入 cURL」区域。
  2. 点击「解析」,在中间「请求结构」中核对或修改 Method、URL、Headers、Body。
  3. 在「生成代码」区选择目标语言(Python、fetch、axios、Go 等)。
  4. 点击「复制代码」;需要在线发请求时,点「在 Postman 中调试」跳转到简易 Postman。

常见问题

会上传我的 cURL 或 Token 吗?
不会。解析与代码生成在浏览器本地 JavaScript 完成,请求不会发往本站服务器。
支持哪些 cURL 格式?
常见 Chrome / Postman 导出:-X、-H、-d、--data-raw、--json、-b、--cookie、-G、-u 等。复杂 multipart 上传后续版本支持。
和「简易 Postman」有什么区别?
本工具专注 cURL 与多语言代码互转;简易 Postman 用于在浏览器内发送 HTTP 请求(受 CORS 限制)。两者可通过「在 Postman 中调试」联动。
能否从 Python 代码反向转成 cURL?
当前版本以 cURL 导入 + 多语言导出为主;反向解析计划在后续版本逐步支持。

上文已说明该工具是本地处理还是会调用第三方接口,请按场景选用。

What it is for

HTTP Request Code Generator helps developers and QA paste cURL from Chrome DevTools, Postman, or Apifox, parse it locally into method, URL, query, headers, cookies, and body, then export Python requests, JavaScript fetch/axios, Go net/http, Java OkHttp, Rust reqwest, or cURL. Tokens stay in your browser — ideal for API debugging, test migration, and multilingual doc snippets.

How to use

  1. Copy cURL from DevTools or Postman into the import area.
  2. Click Parse and review Method, URL, headers, and body in the structure panel.
  3. Pick a target language tab (Python, fetch, axios, Go, etc.).
  4. Copy the code; use Debug in Postman to send the request on this site.

FAQ

Is my cURL or token uploaded?
No. Parsing and codegen run locally in JavaScript; nothing is sent to our servers.
Which cURL flags are supported?
Common exports: -X, -H, -d, --data-raw, --json, -b, --cookie, -G, -u. Multipart uploads are planned.
How is this different from the HTTP client?
This tool converts cURL to code; the HTTP client sends requests (CORS applies). Use the bridge button to hand off.
Reverse parse from Python to cURL?
v1 focuses on cURL in and code out; reverse parsers will arrive in later releases.

Processing notes above describe whether work stays in your browser or calls third-party APIs.

404

工具不存在或链接有误。