Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update https://registry.npm.taobao.org to https://registry.npmmirror.com #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/beidou-docs/en/core/http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/beidou-docs/zh/core/http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 秒超时
Expand Down