@ahoo-wang/fetcher 2.15.6 → 2.15.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/README.zh-CN.md +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -190,6 +190,7 @@ Fetcher comes with several built-in interceptors that are automatically register
|
|
|
190
190
|
3. **FetchInterceptor**: Executes the actual HTTP request (order: Number.MAX_SAFE_INTEGER - 1000)
|
|
191
191
|
4. **ValidateStatusInterceptor**: Validates HTTP status codes and throws errors for invalid statuses (response
|
|
192
192
|
interceptor, order: Number.MAX_SAFE_INTEGER - 1000)
|
|
193
|
+
5. **UnauthorizedErrorInterceptor**: Interceptor for handling unauthorized errors (401 status code)
|
|
193
194
|
|
|
194
195
|
### Using Interceptors
|
|
195
196
|
|
package/README.zh-CN.md
CHANGED
|
@@ -179,6 +179,7 @@ Fetcher 自带几个内置拦截器,它们会自动注册:
|
|
|
179
179
|
3. **FetchInterceptor**:执行实际的 HTTP 请求(顺序:Number.MAX_SAFE_INTEGER - 1000)
|
|
180
180
|
4. **ValidateStatusInterceptor**:验证 HTTP 状态码并在状态码无效时抛出错误(响应拦截器,顺序:Number.MAX_SAFE_INTEGER -
|
|
181
181
|
1000)
|
|
182
|
+
5. **UnauthorizedErrorInterceptor**:处理未授权错误(401状态码)的拦截器
|
|
182
183
|
|
|
183
184
|
### 使用拦截器
|
|
184
185
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahoo-wang/fetcher",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.7",
|
|
4
4
|
"description": "Fetcher is not just another HTTP client—it's a complete ecosystem designed for modern web development with native LLM\nstreaming API support. Built on the native Fetch API, Fetcher provides an Axios-like experience with powerful features\nwhile maintaining an incredibly small footprint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fetch",
|