📜  请求模块 nodejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:44.729000             🧑  作者: Mango

代码示例3
request  .get('http://google.com/img.png')
  .on('response', function(response) {
  console.log(response.statusCode) // 200
  console.log(response.headers['content-type']) // 'image/png'  }) 
    .pipe(request.put('http://mysite.com/img.png'))