From 4e2a2fbb8e8879e3983b3a36673effc27222c2da Mon Sep 17 00:00:00 2001 From: NPM Mirror Bot Date: Sat, 12 Feb 2022 05:58:20 +0000 Subject: [PATCH] update https://registry.npm.taobao.org to https://registry.npmmirror.com --- packages/beidou-docs/en/core/http-client.md | 6 +++--- packages/beidou-docs/zh/core/http-client.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/beidou-docs/en/core/http-client.md b/packages/beidou-docs/en/core/http-client.md index cbb84aec..ddbfb444 100644 --- a/packages/beidou-docs/en/core/http-client.md +++ b/packages/beidou-docs/en/core/http-client.md @@ -16,8 +16,8 @@ So you can easily use `app.curl` to complete a HTTP request. // app.js module.exports = app => { app.beforeStart(function* () { - // example: read the version info on https://registry.npm.taobao.org/beidou-core/latest when it starts - const result = yield app.curl('https://registry.npm.taobao.org/beidou-core/latest', { + // example: read the version info on https://registry.npmmirror.com/beidou-core/latest when it starts + const result = yield app.curl('https://registry.npmmirror.com/beidou-core/latest', { dataType: 'json', }); app.logger.info('Beidou latest version: %s', result.data.version); @@ -34,7 +34,7 @@ So it's very easy to use `ctx.curl()` to complete a HTTP request in the Context // app/controller/home.js module.exports = function* home(ctx) { // example: request a npm module's info - const result = yield ctx.curl('https://registry.npm.taobao.org/beidou-core/latest', { + const result = yield ctx.curl('https://registry.npmmirror.com/beidou-core/latest', { // parse JSON response dataType: 'json', // timeout of 3s diff --git a/packages/beidou-docs/zh/core/http-client.md b/packages/beidou-docs/zh/core/http-client.md index d9422117..c24d8cec 100644 --- a/packages/beidou-docs/zh/core/http-client.md +++ b/packages/beidou-docs/zh/core/http-client.md @@ -16,8 +16,8 @@ HttpClient/调用http服务 // app.js module.exports = app => { app.beforeStart(function* () { - // 示例:启动的时候去读取 https://registry.npm.taobao.org/egg/latest 的版本信息 - const result = yield app.curl('https://registry.npm.taobao.org/egg/latest', { + // 示例:启动的时候去读取 https://registry.npmmirror.com/egg/latest 的版本信息 + const result = yield app.curl('https://registry.npmmirror.com/egg/latest', { dataType: 'json', }); app.logger.info('Egg latest version: %s', result.data.version); @@ -34,7 +34,7 @@ module.exports = app => { // app/controller/home.js module.exports = function* home(ctx) { // 示例:请求一个 npm 模块信息 - const result = yield ctx.curl('https://registry.npm.taobao.org/egg/latest', { + const result = yield ctx.curl('https://registry.npmmirror.com/egg/latest', { // 自动解析 JSON response dataType: 'json', // 3 秒超时