Request Enterprise
http(s) wrapper for nodejs, dedicated to enterprise networks proxy & sso support
Installation
npm install request-enterprise
Description
Simplify use of get/post requests especially behind a proxy or requiring certificate authentication. Follow links if there header contains redirection location information For https on windows or mac, if certificate name is specified, extract the certificate from user's certificate store and execute the request with the certificate Get the result as a stream or in a callback
This module works great with sax and oboe
Note: this module has no intention to replace the popular request module but to offer one similar, targeted for those of us who work in big companies
Usage
To activate https certificate support call init method with params name, pfxPath, passphrase
var request = download
To configure a proxy, pass the url of the proxy in second argument:
var request = download
Configure User-Agent with third argument:
var request = download
Do a get request:
//simple get
Do a get request asynchronously:
//get with streamed response
Do a post request:
//post
Do a get request with json result as object (works only with callback, to use with pipes, use oboe):
Parse Json as it is received (with streams):
var request = download var oboe = var streamRequest = var parser = streamRequest parser