Skip to content

Commit

Permalink
docs: ✏️ fix link path
Browse files Browse the repository at this point in the history
  • Loading branch information
Josper committed May 6, 2024
1 parent fc54959 commit 82c5fee
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/guide/advance/response-type.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 设置响应数据解析类型 <Badge type="warning" text="操作指南" />

由于默认解析类型为json,但有些接口返回的不是json格式,我们提供了以下方法,参考[内置中间件-ResData](../reference/interface-middleware-builtin.md)
由于默认解析类型为json,但有些接口返回的不是json格式,我们提供了以下方法,参考[内置中间件-ResData](../../reference/interface-middleware-builtin.md)

```ts
import { HttpService, BUILT_IN_MIDDLEWARE } from 'http-svc'
Expand Down
50 changes: 50 additions & 0 deletions docs/guide/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# CHANGELOG

<!-- 所有重要的更改和版本更新将在此文档中进行记录。
格式
每个版本的更改应该以以下格式呈现:
## [版本号] - 发布日期
### Added(⭐️)
- 新增的功能和特性
### Fixed(🐞)
- 修复的 Bug
### Changed(✍🏻)
- 对已有功能或特性的修改
### Removed(🗑)
- 移除的功能或特性
### Deprecated (🚗)
- 弃用的功能或特性 -->

## [v1.0.0-rc.7] - 2024-04-18

### Added

- Bundle update

## [v1.0.0-rc.6] - 2024-03-19

### Added

- Types update

### Fixed

- AssembleCtrl compose bug

## [v1.0.0-rc.1] - 2024-01-11

### Added

- Release RC version
2 changes: 1 addition & 1 deletion docs/guide/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const httpSvc = new HttpService()

## NodeJS 环境使用

本节的API参考见 [服务端环境常用中间件](../guide/reference/npm-server-fetch)
本节的API参考见 [服务端环境常用中间件](../reference/npm-server-fetch)

如果您想在您的node server 中使用请求库,我们提供了一个NPM包 `@http-svc/server-fetch`

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yarn add http-svc

<!-- 具体区别请前往👉🏻[导入](../reference/interface-service.html#导入) -->

在初始化HttpService时,可以传入[全局配置](./reference/interface-service.html#初始化)
在初始化HttpService时,可以传入[全局配置](../reference/interface-service.md#初始化)

```ts
import { HttpService } from 'http-svc'
Expand Down
4 changes: 2 additions & 2 deletions docs/intro/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

## 什么是中间件?

类型参考详见:[中间件](../guide/reference/interface-middleware-builtin.md)

中间件可以是一个在请求过程中的`异步的handler`

例如下方是一个最简单的`函数式中间件`
Expand Down Expand Up @@ -84,3 +82,5 @@ const addSomeParam = async (ctx, next) => {
await next()
}
```

附内置中间件参考:[内置中间件](../reference/interface-middleware-builtin.md)
2 changes: 1 addition & 1 deletion docs/reference/interface-middleware-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

这些中间件大多源自业务中那些高度复用的逻辑而形成,如接口上报、服务端渲染、接口验签、风控等,您可以根据具体的业务、技术场景自由选择。

当然,您也可以根据自己的业务需求,开发自定义的中间件,具体开发方式和 [替换请求库内置的fetch请求](/guide/custom-fetch.md) 类似。
当然,您也可以根据自己的业务需求,开发自定义的中间件,具体开发方式和经典案例中的[自定义fetch中间件](../guide/examples.md#自定义fetch) 类似。

公共中间件和内置中间件无任何关联。
2 changes: 1 addition & 1 deletion docs/reference/interface-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ httpSvc

您在设计中间件时,选择集成HttpSvcMiddleware并且在构造器内调用了super方法传入当前中间件的handler,才能开启默认的disable能力,否则需要您自行在handler内实现

- **继承自默认中间件,详见[什么是中间件](../middleware.html#什么是中间件)**
- **继承自默认中间件,详见[什么是中间件](../intro/middleware.md#什么是中间件)**

```ts
export class HttpSvcAddSomeParams extends HttpSvcMiddleware {
Expand Down

0 comments on commit 82c5fee

Please sign in to comment.