Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

关于http请求:request与superagent,用request能请求到数据,用superagent不能请求到,求大神指点迷津,谢谢

$
0
0
    const url='http://h5vv.video.qq.com/getinfo?callback=txplayerJsonpCallBack_getinfo_591513&isHLS=false&charge=0&vid=y00221a60w7&defn=hd&defnpayver=1&otype=json&guid=29a06bf3852fbe2ea6eb53829c3878fa&platform=10901&sdtfrom=v1010&host=v.qq.com&_rnd=1479010822&fhdswitch=0&show1080p=1&_qv_rmt=sNk0sWZTA17002uQa%3D&_qv_rmt2=0Qs65I9%2B149182HOQ%3D&_=1479010820769'
  
    // request.get(url,(err,sres,body)=>{
    //     res.send({'ss':body})
    // })
    superagent.get(url).end((err,sres)=>{
        res.send({'qq':err,'ww':sres})
    })

求指点,谢谢


Viewing all articles
Browse latest Browse all 14821

Trending Articles