Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

inextor/NodeHttpWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

var cookiejar		= new tough.CookieJar();
HttpProxyAgent		= require('http-proxy-agent');

httpRequest
({
    debug       	: true
    ,url        	: "http://google.com"
    ,agent      	: new HttpProxyAgent( 'http://'+ip.ipAddress+':'+ip.port ) // OR
	//,proxy		: '192.168.1.59' //Best because dectect http or https agent
	//,proxyPort	: 8080
    ,timeout    	: 5000
	,method			: 'POST'
	,cookiejar		: cookiejar //Set the cookies via a cookiejar
	//Setting the cookie via header
    ,headers    	: { 'Accept-Language':'en-US', 'Cookie': 'pmaUser-1=O1Wztglp7FLLwFFj7Jf2LA%3D%3D; pma_lang=en; pma_collation_connection=utf8_general_ci' }
    ,error      	: function(e)
    {
		console.log( e );
    }
	,onData			: function( chunk ){ } //Set for binary Data
    ,success    	: function( data, responseHeaders, cookiejar )
    {

	}
});

##All Options

debug : true url : "http://google.com"
agent : new HttpProxyAgent( 'http://'+ip.ipAddress+':'+ip.port ) // OR
proxy : '192.168.1.59' //Best because dectect http or https agent
proxyPort : 8080
timeout : 5000
method : 'POST'
cookiejar : cookiejar //Set the cookies via a cookiejar
headers : { 'Accept-Language':'en-US', 'Cookie': 'pmaUser-1=O1Wztglp7FLLwFFj7Jf2LA%3D%3D; pma_lang=en; pma_collation_connection=utf8_general_ci' }
error : function(e)
onData : function( chunk ){ } //Set for binary Data
success : function( data, responseHeaders, cookiejar )

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages