
使用 echoapi,您可以直接从代码编辑器测试您的 api。您可以保存请求集合,并在需要时重新访问(无论是一天还是一个月后)。另外,您可以将集合导出为 json 文件,以便与您的团队共享或供将来使用。
echoapi是一款支持scratch pad的超轻量级api开发协作工具。它是 postman 的绝佳替代品,为您提供 api 设计、调试、自动化测试和负载测试等功能。它还与 intellij idea、vs code 甚至 chrome 请求捕获扩展集成,所有这些都不需要登录。
要使用 echoapi 扩展,请单击操作栏上的 echoapi 图标。在侧边栏中,点击“新建请求”按钮来测试您的 api。
假设您需要使用以下详细信息测试 api:
url: https://httpbin.org/anything
method: post
content: {
"username": "admin",
"password": "password"
}

只需将此信息输入 echoapi 请求表单,您就可以启动请求了。
echoapi 还可以为 curl 命令、javascript axios 和其他选项生成代码片段。以下是 echoapi 中 jwt auth 请求的 curl 命令的样子:
curl -x post \
'https://httpbin.org/anything' \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '{
"username": "admin",
"password": "password"
}'
这是一个 javascript axios 请求:

import axios from "axios";
const options = {
method: 'post',
url: 'https://httpbin.org/anything',
headers: {
accept: '*/*',
'content-type': 'application/json',
'accept-encoding': 'gzip, deflate, br',
'user-agent': 'echoapiruntime/1.1.0',
connection: 'keep-alive'
},
data: {username: 'admin', password: 'password'}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
您还可以将 curl 请求导入 echoapi,echoapi 会自动为您创建请求。然后,使用格式按钮格式化 json 或 xml 内容。
例如,从jasmin短信网关导入curl请求:
curl -X POST \
'https://httpbin.org/anything' \
--header 'Accept: */*' \
--header 'Authorization: Basic Zm9vOmJhcg==' \
--header 'Content-Type: application/json' \
--data '{
"to": 19012233451,
"from": "Jookies",
"content": "Hello",
"dlr": "yes",
"dlr-url": "http://192.168.202.54/dlr_receiver.php",
"dlr-level": 3
}'

以上就是VS Code 使用 Thunder 客户端?停止!这是满足您的 API 测试需求的理想扩展的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号