2022-12-31 00:13:44 +08:00
|
|
|
|
# Postcat API 客户端(Client)
|
2022-04-19 14:28:31 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
![Postcat API Client](http://data.eolinker.com/course/QbLMSaJ7f3dcd0b075a7031b31f8acb486e0a090f1bdc8d.jpeg)
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2023-01-02 20:33:35 +08:00
|
|
|
|
<p align="center"><a href="wiki/README.en.md">English</a> | <span>简体中文</span></p>
|
2023-03-03 11:54:05 +08:00
|
|
|
|
<p align="center">
|
|
|
|
|
<a href="https://github.com/Postcatlab/postcat"><img src="https://img.shields.io/github/license/Postcatlab/postcat?sanitize=true" alt="License"></a>
|
|
|
|
|
<a href="https://github.com/Postcatlab/postcat/releases"><img src="https://img.shields.io/github/v/release/Postcatlab/postcat?sanitize=true" alt="Version"></a>
|
|
|
|
|
<a href="https://github.com/Postcatlab/postcat/releases"><img src="https://img.shields.io/github/downloads/Postcatlab/postcat/total?sanitize=true" alt="Downloads"></a>
|
|
|
|
|
<a href="https://discord.gg/W3uk39zJCR"><img src="https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true" alt="Chat"></a>
|
|
|
|
|
</p>
|
2022-11-11 00:05:02 +08:00
|
|
|
|
|
2023-03-07 10:22:57 +08:00
|
|
|
|
## 概述
|
2022-11-11 00:09:18 +08:00
|
|
|
|
|
2023-03-07 10:22:57 +08:00
|
|
|
|
**Postcat** 是一个强大的开源、免费的、跨平台(Windows、Mac、Linux、Browsers...)的 **API 开发测试工具**,支持 REST、Websocket 等协议(即将支持 GraphQL、gRPC、TCP、UDP),帮助你加速完成 API 开发和测试工作。它非常适合中小团队及个人使用。
|
2022-04-19 14:28:31 +08:00
|
|
|
|
|
2023-03-07 10:22:57 +08:00
|
|
|
|
![Postcat UI](https://data.eolink.com/ImGzhCi79d0beb5b8221670dffceb61bf642af1960d3881)
|
2022-04-19 14:28:31 +08:00
|
|
|
|
|
2023-03-07 10:22:57 +08:00
|
|
|
|
我们在保证 **Postcat** 轻巧灵活的同时,还为它设计了一个强大的插件系统,让您可以一键使用插件来增强它的功能。
|
2022-02-25 19:39:31 +08:00
|
|
|
|
|
2023-03-03 12:19:31 +08:00
|
|
|
|
![Postcat Extensions](https://data.eolink.com/22UMwcV01e087e3549edb91361f15a9ba8047e16d0d3f3f)
|
2022-08-05 14:15:00 +08:00
|
|
|
|
|
2023-03-07 10:22:57 +08:00
|
|
|
|
因此 **Postcat** 理论上是一个拥有无限可能的 API 产品,可以从Logo 中看到,我们也形象地为它加上了一件披风,代表它的无限可能。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 免登录在线使用或下载
|
|
|
|
|
|
|
|
|
|
**Postcat** 现在已经支持 Windows、Mac、Linux等系统,你可以通过以下地址访问并下载。同时我们也提供了 Web 端,方便你在任何浏览器上使用。
|
|
|
|
|
|
|
|
|
|
**[https://postcat.com/](https://postcat.com//)**
|
|
|
|
|
|
|
|
|
|
如果您试用之后觉得不错,**请给我们的Postcat一个 Star 和 Fork~**你的支持是我们不断改进产品的动力!
|
|
|
|
|
|
|
|
|
|
## 详细的文档
|
|
|
|
|
|
|
|
|
|
[Postcat 文档](https://docs.postcat.com/)
|
|
|
|
|
|
|
|
|
|
[插件开发文档](https://developer.postcat.com/api/get-started.html)
|
|
|
|
|
|
2022-04-20 16:33:43 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
## 功能特性和迭代计划(Roadmap)
|
2022-04-20 16:33:43 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🚀 多协议支持
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
-- 已实现:HTTP REST、Websocket
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
-- 即将实现:GraphQL、TCP、UDP、gRPC
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 📕 API 文档
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- ✨ API 设计
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- ⚡ API 测试
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🎭 Mock
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🙌 团队协作
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🎈 文档分享
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🗺 环境
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🧶 全局变量
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🧩 自定义主题风格
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- 🌐 多语言支持:中文、English
|
2022-02-25 19:39:31 +08:00
|
|
|
|
|
2023-03-02 23:07:40 +08:00
|
|
|
|
了解更多具体迭代计划:[Github Project](https://github.com/orgs/Postcatlab/projects/3)
|
2023-03-07 10:22:57 +08:00
|
|
|
|
</br>也欢迎给我们多多提需求~
|
2023-03-03 11:54:05 +08:00
|
|
|
|
</br>
|
|
|
|
|
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
## Bug 和需求反馈
|
2022-08-05 14:15:00 +08:00
|
|
|
|
|
2023-02-11 13:44:40 +08:00
|
|
|
|
如果想要反馈 Bug、提供产品意见,可以创建一个 [Github issue](https://github.com/Postcatlab/postcat/issues) 联系我们,十分感谢!
|
2022-12-31 00:13:44 +08:00
|
|
|
|
|
2023-03-07 10:22:57 +08:00
|
|
|
|
如果您希望和 Postcat 团队近距离交流,讨论产品使用技巧以及了解更多产品最新进展,欢迎加入以下渠道。
|
2022-12-31 00:13:44 +08:00
|
|
|
|
|
|
|
|
|
- QQ群号码:981965807
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
- QQ群链接:[加入Postcat 用户群](https://jq.qq.com/?_wv=1027&k=Kej1qTUy)
|
|
|
|
|
|
|
|
|
|
- 微信群:
|
|
|
|
|
|
|
|
|
|
![](http://data.eolinker.com/course/NKhRRF668370911c8b8ea8a0887b5d62e71b0f1a22ad76a.png)
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-02-05 19:24:02 +08:00
|
|
|
|
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
## 开发 Postcat
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
<details>
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
<summary>运行代码</summary>
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|
|
|
|
|
请确保你已经部署好所需的开发环境:
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-05-25 18:32:14 +08:00
|
|
|
|
- Node.js >= 14.17.x
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-05-27 16:25:44 +08:00
|
|
|
|
- yarn >= 1.22.x
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
我们在开发和构建时使用 yarn 作为包管理工具,强烈建议你也这么做,但如果您希望使用 npm 也完全没问题,只是在安装依赖时可能需要多花一些时间。
|
2022-01-17 14:50:31 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
### 运行桌面端程序
|
2022-05-25 18:22:21 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
```shell
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-05-27 16:25:44 +08:00
|
|
|
|
yarn install
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-05-27 16:25:44 +08:00
|
|
|
|
yarn start
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-01-17 14:50:31 +08:00
|
|
|
|
```
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
### 运行浏览器程序
|
|
|
|
|
|
|
|
|
|
```shell
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
|
|
|
|
cd src/workbench/browser&&npm install
|
|
|
|
|
|
2022-12-30 23:46:51 +08:00
|
|
|
|
yarn start
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-30 23:46:51 +08:00
|
|
|
|
```
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
### 提高效率
|
|
|
|
|
|
2022-04-19 14:28:31 +08:00
|
|
|
|
如果想提高开发效率,可以安装 Angular 官方提供的命令行 Angular-cli 快速生成组件、服务等模板。
|
2022-01-17 14:50:31 +08:00
|
|
|
|
|
|
|
|
|
```
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-05-27 16:25:44 +08:00
|
|
|
|
yarn add @angular/cli --global
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-01-17 14:50:31 +08:00
|
|
|
|
```
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
<details>
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
<summary>内置命令</summary>
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
### 运行命令
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|命令 |描述 |
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
| ------------ | ------------ |
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
|
|
|
|
|yarn start |开发模式下,同时运行在浏览器和桌面端 |
|
|
|
|
|
|
|
|
|
|
|yarn start:web |仅运行在浏览器,同时开启后端代理 |
|
|
|
|
|
|
|
|
|
|
|yarn start:electron|仅运行在桌面端 |
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-04-19 14:28:31 +08:00
|
|
|
|
### 打包构建
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|命令 |描述 |
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
| ------------ | ------------ |
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|
|
|
|
|
|sudo yarn build|各系统打包 Electron 应用 |
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2022-04-19 14:28:31 +08:00
|
|
|
|
### 运行测试
|
2022-02-03 11:16:53 +08:00
|
|
|
|
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|命令 |描述 |
|
|
|
|
|
|
2022-12-31 00:13:44 +08:00
|
|
|
|
| ------------ | ------------ |
|
2022-02-15 16:23:30 +08:00
|
|
|
|
|
2023-03-03 11:54:05 +08:00
|
|
|
|
|yarn test |执行单元测试 |
|
|
|
|
|
|
|
|
|
|
</d
|
|
|
|
|
|