在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML5  HTML/ 兩個(gè)node 后端請(qǐng)求包(superagent和request)的get請(qǐng)求有什

兩個(gè)node 后端請(qǐng)求包(superagent和request)的get請(qǐng)求有什么不同嗎?

  superagent
  // 設(shè)置些需要的頭
  .get('http://passport.chinahr.com/ajax/m/existLoginName')
  .query('input' + "=" + 15800000000)
  .end(function (err, response) {
    console.log('返回', response.body, err)
  });

  request
  .get('http://passport.chinahr.com/ajax/m/existLoginName?input=15800000000', function (err, res) {
    console.log('req', res.body)
  })
  
  
  請(qǐng)求中華人才網(wǎng)的一個(gè)接口,用request.get 能正確返回想要的結(jié)果用superagent卻得到空。
回答
編輯回答
墨染殤

如果響應(yīng)的content-typetext,superagent會(huì)放在response.text里。

2017年11月24日 09:07