diff --git a/README.md b/README.md index 623246b..7cb7c82 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - 简单易用的消息搬运功能。 - 简单强大的自定义回复功能。 - 完整支持 ECMAScript 5.1 的插件系统,基于 [otto](https://github.com/robertkrimen/otto)。 -- 支持通过内置的阉割版 `Express` / `request` ,接入互联网。 +- 支持通过内置的阉割版 `Express` / `fetch` ,接入互联网。 - 内置 `Cron` ,轻松实现定时任务。 - 持久化的 `Bucket` 存储模块。 - 支持同时接入多个平台多个机器人,自己开发。 @@ -181,7 +181,7 @@ app.post(api, (req, res) => res.json(req.json())); //第二步,请求第一步实现的接口 const port = Bucket("app").port ?? "8080"; // 获取http服务端口 const url = `http://127.0.0.1:${port}${api}`; -request({ +fetch({ url, method: "POST", body: { value: "test" }, @@ -345,12 +345,12 @@ interface Response { } ``` -### request +### fetch 由 `net/http` 封装而成,如有更多需求可以联系作者。 ```ts -function request(options: { +function fetch(options: { url: string; //请求地址 method: string; //请求方法 headers: { [key: string]: string }; //请求头 diff --git a/core/admin/index.html b/core/admin/index.html index 89b41fa..f624038 100644 --- a/core/admin/index.html +++ b/core/admin/index.html @@ -8,6 +8,6 @@
- +