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 #4881

Merged
merged 1 commit into from
Feb 12, 2022
Merged
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 docs/docs/core/httpclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ So you can easily use `app.curl` to complete a HTTP request.
// app.js
module.exports = (app) => {
app.beforeStart(async () => {
// example: read the version info on https://registry.npm.taobao.org/egg/latest when it starts
// example: read the version info on https://registry.npmmirror.com/egg/latest when it starts
const result = await app.curl(
'https://registry.npm.taobao.org/egg/latest',
'https://registry.npmmirror.com/egg/latest',
{
dataType: 'json',
},
Expand All @@ -43,7 +43,7 @@ class NpmController extends Controller {

// example: request a npm module's info
const result = await ctx.curl(
'https://registry.npm.taobao.org/egg/latest',
'https://registry.npmmirror.com/egg/latest',
{
// parse JSON response
dataType: 'json',
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/core/httpclient.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ order: 5
// app.js
module.exports = (app) => {
app.beforeStart(async () => {
// 示例:启动的时候去读取 https://registry.npm.taobao.org/egg/latest 的版本信息
// 示例:启动的时候去读取 https://registry.npmmirror.com/egg/latest 的版本信息
const result = await app.curl(
'https://registry.npm.taobao.org/egg/latest',
'https://registry.npmmirror.com/egg/latest',
{
dataType: 'json',
},
Expand All @@ -43,7 +43,7 @@ class NpmController extends Controller {

// 示例:请求一个 npm 模块信息
const result = await ctx.curl(
'https://registry.npm.taobao.org/egg/latest',
'https://registry.npmmirror.com/egg/latest',
{
// 自动解析 JSON response
dataType: 'json',
Expand Down