Skip to content

kokokele/request-by-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

request-by-proxy

this is request by proxy in node.

install

npm install --save request-by-proxy

use

const rp =  require('request-by-proxy');

// rp(target, proxy, options);

rp( 'http://www.baidu.com', 'youdomin:port').then(res => {
        console.log(res);
    }).catch(err=> {
        console.log(err);
    });

options

  • method : 'POST' | 'GET' , default 'GET'
  • writePath: save response in disk path, default null
  • postData: post data (JSON) , default null
  • contentType: content-type: 'json' | 'formData', default 'formData'

About

requset something by proxy in node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published