Spaces:
Sleeping
Sleeping
Download shared/utils/request.ts from asemxin2000/wechat-article: direct link, hf CLI and curl.
- Browser
- Download file 333 Bytes
-
https://huggingface.co/spaces/asemxin2000/wechat-article/resolve/main/shared/utils/request.ts
- Command line
-
hf download hf://spaces/asemxin2000/wechat-article/shared/utils/request.ts
-
curl -L -o request.ts https://huggingface.co/spaces/asemxin2000/wechat-article/resolve/main/shared/utils/request.ts
333 Bytes
| /** | |
| * 封装 $fetch 无重试请求 | |
| */ | |
| export const request = $fetch.create({ | |
| retry: 0, | |
| method: 'GET', | |
| async onResponse({ request, response, options, error }) { | |
| // 需要注意的是,这里有可能是客户端和服务器端调用 | |
| }, | |
| async onResponseError({ request, response, options, error }) {}, | |
| }); | |