diff --git a/README.md b/README.md index ffe946e..209776e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + +> [!NOTE] +> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。 +> [English](./README.en.md) · [原始项目](https://github.com/hoppscotch/hoppscotch) · [上游 README](https://github.com/hoppscotch/hoppscotch/blob/HEAD/README.md) +> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。 +
- Open Source API Development Ecosystem + 开源 API 开发生态系统

@@ -21,10 +27,11 @@

- Built with ❤︎ by + 由 contributors + 用 ❤︎ 构建


@@ -39,75 +46,75 @@

-_We highly recommend you take a look at the [**Hoppscotch Documentation**](https://docs.hoppscotch.io) to learn more about the app._ +_我们强烈建议你阅读 [**Hoppscotch 文档**](https://docs.hoppscotch.io),以进一步了解该应用。_ -#### **Support** +#### **支持** [![Chat on Discord](https://img.shields.io/badge/chat-Discord-7289DA?logo=discord)](https://hoppscotch.io/discord) [![Chat on Telegram](https://img.shields.io/badge/chat-Telegram-2CA5E0?logo=telegram)](https://hoppscotch.io/telegram) [![Discuss on GitHub](https://img.shields.io/badge/discussions-GitHub-333333?logo=github)](https://github.com/hoppscotch/hoppscotch/discussions) -### **Features** +### **功能特性** -❤️ **Lightweight:** Crafted with minimalistic UI design. +❤️ **轻量:** 采用极简 UI 设计精心打造。 -⚡️ **Fast:** Send requests and get responses in real time. +⚡️ **快速:** 实时发送请求并获取响应。 -🗄️ **HTTP Methods:** Request methods define the type of action you are requesting to be performed. +🗄️ **HTTP 方法:** 请求方法定义了你要执行的操作类型。 -- `GET` - Requests retrieve resource information -- `POST` - The server creates a new entry in a database -- `PUT` - Updates an existing resource -- `PATCH` - Very similar to `PUT` but makes a partial update on a resource -- `DELETE` - Deletes resource or related component -- `HEAD` - Retrieve response headers identical to those of a GET request, but without the response body. -- `CONNECT` - Establishes a tunnel to the server identified by the target resource -- `OPTIONS` - Describe the communication options for the target resource -- `TRACE` - Performs a message loop-back test along the path to the target resource -- `` - Some APIs use custom request methods such as `LIST`. Type in your custom methods. +- `GET` - 请求用于获取资源信息 +- `POST` - 服务器在数据库中创建新条目 +- `PUT` - 更新现有资源 +- `PATCH` - 与 `PUT` 非常相似,但对资源进行部分更新 +- `DELETE` - 删除资源或相关组件 +- `HEAD` - 获取与 GET 请求相同的响应头,但不包含响应体。 +- `CONNECT` - 与目标资源标识的服务器建立隧道 +- `OPTIONS` - 描述目标资源的通信选项 +- `TRACE` - 沿通往目标资源的路径执行消息回环测试 +- `` - 部分 API 使用自定义请求方法,例如 `LIST`。输入你的自定义方法。 -🌈 **Theming:** Customizable combinations for background, foreground, and accent colors — [customize now](https://hoppscotch.io/settings). +🌈 **主题:** 可自定义背景、前景和强调色的组合 — [立即自定义](https://hoppscotch.io/settings). -- Choose a theme: System preference, Light, Dark, and Black -- Choose accent colors: Green, Teal, Blue, Indigo, Purple, Yellow, Orange, Red, and Pink -- Distraction-free Zen mode +- 选择主题:系统偏好、浅色、深色和黑色 +- 选择强调色:绿色、青绿、蓝色、靛蓝、紫色、黄色、橙色、红色和粉色 +- 无干扰禅模式 -_Customized themes are synced with your cloud/local session._ +_自定义主题会与你的云端/本地会话同步。_ -🔥 **PWA:** Install as a [Progressive Web App](https://web.dev/progressive-web-apps) on your device. +🔥 **PWA:** 在你的设备上安装为 [渐进式 Web 应用(Progressive Web App)](https://web.dev/progressive-web-apps)。 -- Instant loading with Service Workers -- Offline support -- Low RAM/memory and CPU usage -- Add to Home Screen -- Desktop PWA +- 通过 Service Workers 实现即时加载 +- 离线支持 +- 低 RAM/内存和 CPU 占用 +- 添加到主屏幕 +- 桌面端 PWA -🚀 **Request:** Retrieve response from endpoint instantly. +🚀 **请求:** 即时从端点获取响应。 -1. Choose `method` -2. Enter `URL` -3. Send +1. 选择 `method` +2. 输入 `URL` +3. 发送 -- Copy/share public "Share URL" -- Generate/copy request code snippets for 10+ languages and frameworks -- Import `cURL` -- Label requests +- 复制/分享公开的「Share URL」 +- 为 10+ 种语言和框架生成/复制请求代码片段 +- 导入 `cURL` +- 为请求添加标签 -🔌 **WebSocket:** Establish full-duplex communication channels over a single TCP connection. +🔌 **WebSocket:** 在单个 TCP 连接上建立全双工通信通道。 -📡 **Server-Sent Events:** Receive a stream of updates from a server over an HTTP connection without resorting to polling. +📡 **服务器发送事件(Server-Sent Events):** 通过 HTTP 连接接收来自服务器的更新流,无需轮询。 -🌩 **Socket.IO:** Send and Receive data with the SocketIO server. +🌩 **Socket.IO:** 与 SocketIO 服务器收发数据。 -🦟 **MQTT:** Subscribe and Publish to topics of an MQTT Broker. +🦟 **MQTT:** 订阅和发布 MQTT Broker 的主题。 -🔮 **GraphQL:** GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. +🔮 **GraphQL:** GraphQL 是一种用于 API 的查询语言,也是用现有数据执行这些查询的运行时。 -- Set endpoint and get schema -- Multi-column docs -- Set custom request headers -- Query schema -- Get query response +- 设置端点并获取 schema +- 多列文档 +- 设置自定义请求头 +- 查询 schema +- 获取查询响应 -🔐 **Authorization:** Allows to identify the end-user. +🔐 **授权:** 用于识别最终用户。 - None - Basic @@ -115,185 +122,188 @@ _Customized themes are synced with your cloud/local session._ - OAuth 2.0 - OIDC Access Token/PKCE -📢 **Headers:** Describes the format the body of your request is being sent in. +📢 **请求头:** 描述请求体的发送格式。 -📫 **Parameters:** Use request parameters to set varying parts in simulated requests. +📫 **参数:** 使用请求参数在模拟请求中设置可变部分。 -📃 **Request Body:** Used to send and receive data via the REST API. +📃 **请求体:** 用于通过 REST API 收发数据。 -- Set `Content Type` -- FormData, JSON, and many more -- Toggle between key-value and RAW input parameter list +- 设置 `Content Type` +- FormData、JSON 等多种格式 +- 在键值对和 RAW 输入参数列表之间切换 -📮 **Response:** Contains the status line, headers, and the message/response body. +📮 **响应:** 包含状态行、请求头和消息/响应体。 -- Copy the response to the clipboard -- Download the response as a file -- View response headers -- View raw and preview HTML, image, JSON, and XML responses +- 将响应复制到剪贴板 +- 将响应下载为文件 +- 查看响应头 +- 查看原始数据并预览 HTML、图片、JSON 和 XML 响应 -⏰ **History:** Request entries are synced with your cloud/local session storage. +⏰ **历史记录:** 请求条目会与你的云端/本地会话存储同步。 -📁 **Collections:** Keep your API requests organized with collections and folders. Reuse them with a single click. +📁 **集合:** 通过集合和文件夹整理 API 请求,一键复用。 -- Unlimited collections, folders, and requests -- Nested folders -- Export and import as a file or GitHub gist +- 不限数量的集合、文件夹和请求 +- 嵌套文件夹 +- 以文件或 GitHub gist 形式导出和导入 -_Collections are synced with your cloud/local session storage._ +_集合会与你的云端/本地会话存储同步。_ -📜 **Pre-Request Scripts:** Snippets of code associated with a request that is executed before the request is sent. +📜 **预请求脚本:** 与请求关联的代码片段,在请求发送前执行。 -- Set environment variables -- Include timestamp in the request headers -- Send a random alphanumeric string in the URL parameters -- Any JavaScript functions +- 设置环境变量 +- 在请求头中包含时间戳 +- 在 URL 参数中发送随机字母数字字符串 +- 任意 JavaScript 函数 -👨‍👩‍👧‍👦 **Teams:** Helps you collaborate across your teams to design, develop, and test APIs faster. +👨‍👩‍👧‍👦 **团队:** 帮助你在团队间协作,更快设计、开发和测试 API。 -- Create unlimited teams -- Create unlimited shared collections -- Create unlimited team members -- Role-based access control -- Cloud sync -- Multiple devices +- 创建不限数量的团队 +- 创建不限数量的共享集合 +- 创建不限数量的团队成员 +- 基于角色的访问控制 +- 云端同步 +- 多设备 -👥 **Workspaces:** Organize your personal and team collections environments into workspaces. Easily switch between workspaces to manage multiple projects. +👥 **工作区:** 将个人和团队的集合环境组织到工作区中,轻松切换工作区以管理多个项目。 -- Create unlimited workspaces -- Switch between personal and team workspaces +- 创建不限数量的工作区 +- 在个人和团队工作区之间切换 -⌨️ **Keyboard Shortcuts:** Optimized for efficiency. +⌨️ **键盘快捷键:** 为高效操作而优化。 -> **[Read our documentation on Keyboard Shortcuts](https://docs.hoppscotch.io/documentation/features/shortcuts)** +> **[阅读我们的键盘快捷键文档](https://docs.hoppscotch.io/documentation/features/shortcuts)** -🌐 **Proxy:** Enable Proxy Mode from Settings to access blocked APIs. +🌐 **代理:** 在设置中启用代理模式以访问被阻止的 API。 -- Hide your IP address -- Fixes [`CORS`](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross-Origin Resource Sharing) issues -- Access APIs served in non-HTTPS (`http://`) endpoints -- Use your Proxy URL +- 隐藏你的 IP 地址 +- 修复 [`CORS`](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)(跨源资源共享,Cross-Origin Resource Sharing)问题 +- 访问通过非 HTTPS(`http://`)端点提供的 API +- 使用你的代理 URL -_Official proxy server is hosted by Hoppscotch - **[GitHub](https://github.com/hoppscotch/proxyscotch)** - **[Privacy Policy](https://docs.hoppscotch.io/support/privacy)**._ +_官方代理服务器由 Hoppscotch 托管 - **[GitHub](https://github.com/hoppscotch/proxyscotch)** - **[隐私政策(Privacy Policy)](https://docs.hoppscotch.io/support/privacy)**._ -🌎 **i18n:** Experience the app in your language. +🌎 **国际化(i18n):** 用你的语言体验应用。 -Help us to translate Hoppscotch. Please read [`TRANSLATIONS`](TRANSLATIONS.md) for details on our [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md) and the process for submitting pull requests to us. +帮助我们翻译 Hoppscotch。请阅读 [`TRANSLATIONS`](TRANSLATIONS.md) 了解我们的 [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md) 以及向我们提交拉取请求的流程。 -☁️ **Auth + Sync:** Sign in and sync your data in real-time across all your devices. +☁️ **认证 + 同步:** 登录并在所有设备上实时同步你的数据。 -**Sign in with:** +**登录方式:** - GitHub - Google - Microsoft - Email -- SSO (Single Sign-On)[^EE] +- SSO(单点登录,Single Sign-On)[^EE] -**🔄 Synchronize your data:** Handoff to continue tasks on your other devices. +**🔄 同步你的数据:** 接力在其他设备上继续任务。 -- Workspaces -- History -- Collections -- Environments -- Settings +- 工作区 +- 历史记录 +- 集合 +- 环境 +- 设置 -✅ **Post-Request Tests:** Write tests associated with a request that is executed after the request's response. +✅ **请求后测试:** 编写与请求关联的测试,在收到响应后执行。 -- Check the status code as an integer -- Filter response headers -- Parse the response data -- Set environment variables -- Write JavaScript code +- 将状态码作为整数检查 +- 筛选响应头 +- 解析响应数据 +- 设置环境变量 +- 编写 JavaScript 代码 -🌱 **Environments:** Environment variables allow you to store and reuse values in your requests and scripts. +🌱 **环境:** 环境变量让你能在请求和脚本中存储并复用值。 -- Unlimited environments and variables -- Initialize through the pre-request script -- Export as / import from GitHub gist +- 不限数量的环境和变量 +- 通过预请求脚本初始化 +- 导出为 / 从 GitHub gist 导入
- Use-cases + 使用场景 --- -- By storing a value in a variable, you can reference it throughout your request section -- If you need to update the value, you only have to change it in one place -- Using variables increases your ability to work efficiently and minimizes the likelihood of error +- 将值存入变量后,可在请求部分的任意位置引用该变量 +- 如需更新值,只需修改一处 +- 使用变量能提升工作效率,并最大限度降低出错概率 ---
-🚚 **Bulk Edit:** Edit key-value pairs in bulk. +🚚 **批量编辑:** 批量编辑键值对。 -- Entries are separated by newline -- Keys and values are separated by `:` -- Prepend `#` to any row you want to add but keep disabled +- 条目之间以换行分隔 +- 键和值之间以 ``:`` 分隔 +- 在要添加但保持禁用的行前加上 ``#`` -🎛️ **Admin dashboard:** Manage your team and invite members. +🎛️ **管理面板:** 管理团队和邀请成员。 -- Insights -- Manage users -- Manage teams +- 数据洞察 +- 用户管理 +- 团队管理 -📦 **Add-ons:** Official add-ons for hoppscotch. +📦 **附加组件:** Hoppscotch 官方附加组件。 -- **[Hoppscotch CLI](https://github.com/hoppscotch/hoppscotch/tree/main/packages/hoppscotch-cli)** - Command-line interface for Hoppscotch. -- **[Proxy](https://github.com/hoppscotch/proxyscotch)** - A simple proxy server created for Hoppscotch. -- **[Browser Extensions](https://github.com/hoppscotch/hoppscotch-extension)** - Browser extensions that enhance your Hoppscotch experience. +- **[Hoppscotch CLI](https://github.com/hoppscotch/hoppscotch/tree/main/packages/hoppscotch-cli)**)** — Hoppscotch 的命令行界面 +- **[代理](https://github.com/hoppscotch/proxyscotch)**)** — 为 Hoppscotch 创建的简易代理服务器 +- **[浏览器扩展](https://github.com/hoppscotch/hoppscotch-extension)**)** — 提升 Hoppscotch 使用体验的浏览器扩展 - [![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_16x16.png) **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/hoppscotch)  |  [![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_16x16.png) **Chrome**](https://chrome.google.com/webstore/detail/hoppscotch-extension-for-c/amknoiejhlmhancpahfcfcfhllgkpbld) + [![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_16x16.png))**Firefox**](https://addons.mozilla.org/en-US/firefox/addon/hoppscotch))  |  [![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_16x16.png))**Chrome**](https://chrome.google.com/webstore/detail/hoppscotch-extension-for-c/amknoiejhlmhancpahfcfcfhllgkpbld)) - > **Extensions fix `CORS` issues.** + > **扩展修复了 ``CORS`` 的问题。** -_Add-ons are developed and maintained under **[Hoppscotch Organization](https://github.com/hoppscotch)**._ +_附加组件由 **[Hoppscotch 组织](https://github.com/hoppscotch)**._)** 开发和维护。_ -**For a complete list of features, please read our [documentation](https://docs.hoppscotch.io).** +**完整功能列表请阅读我们的[文档](https://docs.hoppscotch.io).**)。** -## **Demo** +## **演示** -- Web : [hoppscotch.io](https://hoppscotch.io) -- Windows/Linux/macOS : [Desktop Apps](https://docs.hoppscotch.io/documentation/clients/desktop#download-hoppscotch-desktop-app) +- Web:[hoppscotch.io](https://hoppscotch.io)) +- Windows/Linux/macOS:[桌面应用](https://docs.hoppscotch.io/documentation/clients/desktop#download-hoppscotch-desktop-app)) -## Usage +## 使用方法 -1. Provide your API endpoint in the URL field -2. Click "Send" to simulate the request -3. View the response +1. 在 URL 字段中输入你的 API 端点 +2. 点击"发送"模拟请求 +3. 查看响应 -## Developing +## 开发 -Follow our [self-hosting documentation](https://docs.hoppscotch.io/documentation/self-host/getting-started) to get started with the development environment. +请参考我们的[自托管文档](https://docs.hoppscotch.io/documentation/self-host/getting-started))来搭建开发环境。 -## Contributing +## 贡献 -Please contribute using [GitHub Flow](https://guides.github.com/introduction/flow). Create a branch, add commits, and [open a pull request](https://github.com/hoppscotch/hoppscotch/compare). +请使用 [GitHub Flow](https://guides.github.com/introduction/flow).) 进行贡献。创建一个分支,提交代码,然后[发起拉取请求](https://github.com/hoppscotch/hoppscotch/compare).)。 -Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md), and the process for submitting pull requests to us. +请阅读 [`CONTRIBUTING`](CONTRIBUTING.md) 了解我们的 [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md) 以及提交拉取请求的流程。 -## Continuous Integration +## 持续集成 -We use [GitHub Actions](https://github.com/features/actions) for continuous integration. Check out our [build workflows](https://github.com/hoppscotch/hoppscotch/actions). +我们使用 [GitHub Actions](https://github.com/features/actions)) 进行持续集成。查看我们的[构建工作流](https://github.com/hoppscotch/hoppscotch/actions).)。 -## Changelog +## 更新日志 -See the [`CHANGELOG`](CHANGELOG.md) file for details. +详情请参见 [`CHANGELOG`](CHANGELOG.md) 文件。 -## Authors +## 作者 -This project owes its existence to the collective efforts of all those who contribute — [contribute now](CONTRIBUTING.md). +本项目的存在离不开所有贡献者的共同努力——[立即贡献](CONTRIBUTING.md)。
Contributors
-## License +## 许可证 -This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) — see the [`LICENSE`](LICENSE) file for details. +本项目基于 [MIT 许可证](https://opensource.org/licenses/MIT)) 授权——详见 [`LICENSE`](LICENSE) 文件。 -[^EE]: Enterprise edition feature. [Learn more](https://docs.hoppscotch.io/documentation/self-host/getting-started). +[^EE]: 企业版功能。[了解更多](https://docs.hoppscotch.io/documentation/self-host/getting-started).) +USD 预算:$0/$3;剩余 $3;已支出 $0;未使用 $0。 + +> **注意:** 免费版 API 不包含企业版功能。