Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…irror.com (#4881)

Co-authored-by: NPM Mirror Bot <npmmirror@localhost>
  • Loading branch information
npmmirror and NPM Mirror Bot committed Feb 12, 2022
1 parent b474097 commit 9003cb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/docs/core/httpclient.md
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
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

1 comment on commit 9003cb5

@vercel
Copy link

@vercel vercel bot commented on 9003cb5 Feb 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.