📮 在线接口测试(简易 Postman)Online API Tester (Postman-style)
在浏览器里直接发 HTTP 请求测试接口:支持 GET/POST/PUT/PATCH/DELETE 等方法、参数表、请求头、JSON/表单/文件请求体、Bearer/Basic/API Key 认证和 {{环境变量}},响应可美化、树形查看和预览,能导入 cURL、生成代码,历史和收藏保存在本地。Send HTTP requests from your browser to test APIs: GET/POST/PUT/PATCH/DELETE, query params, headers, JSON/form/multipart/file bodies, Bearer/Basic/API-key auth and {{variables}}; pretty, tree and preview response views, cURL import, code export, local history and collections.
参数表和地址栏双向同步。The table and the URL query string stay in sync.
认证信息会在发送时自动加到请求里,不会覆盖你手动填写的同名请求头。Auth is added at send time and never overrides a header you set yourself.
在地址、参数、请求头、请求体和认证里写 {{变量名}} 就会替换成当前环境的值。内置动态变量:{{$timestamp}}(秒级时间戳)、{{$timestampMs}}、{{$isoTimestamp}}、{{$guid}}、{{$randomInt}}。Write {{name}} in the URL, params, headers, body or auth to use the current environment's value. Built-in dynamic variables: {{$timestamp}} (seconds), {{$timestampMs}}, {{$isoTimestamp}}, {{$guid}}, {{$randomInt}}.
超时填 0 表示不限时。no-cors 模式下请求能发出,但浏览器不允许页面读取响应,只适合触发 Webhook 之类的场景。0 = no timeout. In no-cors mode the request is sent but the browser hides the response; only useful for fire-and-forget calls such as webhooks.
跨域请求中,浏览器只把服务器用 Access-Control-Expose-Headers 公开的响应头交给页面,其余的响应头不会显示在这里。For cross-origin requests the browser only exposes response headers the server lists in Access-Control-Expose-Headers.
可导入本工具导出的 JSON 或 Postman v2.1 集合。Imports this tool's JSON or Postman v2.1 collections.
历史、收藏和环境变量只保存在你这台设备的浏览器里。History, collections and variables are stored only in this browser.
使用说明与常见问题How-to & FAQ
「在线接口测试(简易 Postman)」是什么?What is the Online API Tester (Postman-style)?
在浏览器里直接发 HTTP 请求测试接口:支持 GET/POST/PUT/PATCH/DELETE 等方法、参数表、请求头、JSON/表单/文件请求体、Bearer/Basic/API Key 认证和 {{环境变量}},响应可美化、树形查看和预览,能导入 cURL、生成代码,历史和收藏保存在本地。Send HTTP requests from your browser to test APIs: GET/POST/PUT/PATCH/DELETE, query params, headers, JSON/form/multipart/file bodies, Bearer/Basic/API-key auth and {{variables}}; pretty, tree and preview response views, cURL import, code export, local history and collections.
如何使用「在线接口测试(简易 Postman)」?How do I use the Online API Tester (Postman-style)?
选择请求方法、填写地址,在“参数”“请求头”“请求体”“认证”里按需填写,点“发送”(或按 Ctrl+Enter)即可看到状态码、耗时、大小、响应头和响应体。也可以把 cURL 命令直接粘贴到地址栏导入,或点“生成代码”导出 cURL、fetch、Axios、Python requests。Pick a method, enter the URL, fill in Params, Headers, Body and Auth as needed, then press Send (or Ctrl+Enter) to see the status, time, size, headers and body. Paste a cURL command into the URL bar to import it, or use Code to export cURL, fetch, Axios or Python requests.
为什么提示跨域(CORS)错误?Why do I get a CORS error?
网页里发出的请求受浏览器跨域规则限制:目标服务器必须在响应里返回 Access-Control-Allow-Origin 等跨域响应头,页面才能读取结果。自己的接口可以在服务端开启 CORS;第三方接口可以复制工具给出的 cURL 命令在终端里运行。失败时工具会自动探测服务器能否连通,帮你区分是跨域限制还是网络问题。Requests made by a web page follow the browser's CORS rules: the server must return Access-Control-Allow-Origin (and related headers) for the page to read the response. Enable CORS on your own API, or run the cURL command the tool gives you in a terminal for third-party APIs. On failure the tool probes whether the server is reachable to tell CORS apart from network errors.
和 Postman、FeHelper 有什么区别?How is it different from Postman or FeHelper?
Postman 是桌面软件,FeHelper 是浏览器插件,都不受网页跨域规则限制;本工具是普通网页,打开即用、无需安装,请求从你的浏览器直接发出,本站不做任何代理中转。因此只能请求允许跨域的接口(例如自己开发的接口、本机 localhost 接口和公开 API),而且 Cookie、Host、Origin 等请求头由浏览器控制,不能手动设置。Postman is a desktop app and FeHelper a browser extension, so neither is bound by web CORS rules. This tool is a plain web page with nothing to install; requests go straight from your browser and this site relays nothing. It therefore works with CORS-enabled APIs (your own, localhost and public APIs), and browser-controlled headers such as Cookie, Host and Origin cannot be set.
可以测试本机 localhost 的接口吗?Can I test a localhost API?
可以。浏览器允许 HTTPS 页面请求 http://localhost 和 http://127.0.0.1,前提是本地服务开启了 CORS(例如返回 Access-Control-Allow-Origin: *)。新版 Chrome 和 Edge 第一次访问本机或局域网地址时,会弹出访问本地网络的权限请求,点“允许”即可。Yes. Browsers let HTTPS pages call http://localhost and http://127.0.0.1 as long as your local server enables CORS (e.g. Access-Control-Allow-Origin: *). Recent Chrome and Edge ask for local-network permission the first time; choose Allow.
环境变量怎么用?How do environment variables work?
在“变量”里新建环境并添加变量,比如 base = https://api.example.com、token = abc,然后在地址、参数、请求头、请求体或认证里写 {{base}}/users、Bearer {{token}},发送时会自动替换。切换环境就能在测试环境和正式环境之间切换。Create an environment under Variables, add e.g. base = https://api.example.com and token = abc, then write {{base}}/users or Bearer {{token}} in the URL, params, headers, body or auth; they are substituted when you send. Switch environments to move between staging and production.
「在线接口测试(简易 Postman)」免费吗?数据会经过本站吗?Is the Online API Tester (Postman-style) free? Does my data pass through this site?
「在线接口测试」完全免费,无需注册或安装。请求从你的浏览器直接发到你填写的地址,不经过本站服务器;历史记录、收藏和环境变量只保存在你这台设备的浏览器里,可以随时导出或清空。The Online API Tester is free with no sign-up or install. Requests go directly from your browser to the URL you enter, never through this site's servers; history, collections and variables stay in this browser and can be exported or cleared at any time.