Package Exports
- request-ntlm-promise
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (request-ntlm-promise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Request-NTLM-promise
Ntlm authentication wrapper for the Request promise module. It authenticates each request via NTLM protocol.
Usage
Install from npm
$ npm install request-ntlm-promiseImport
const ntlm = require('request-ntlm-promise');
Choose method
reqntlm.get(options, json)
reqntlm.post(options, json)
reqntlm.patch(options, json)
reqntlm.put(options, json)
reqntlm.delete(options, json)
Possible parameters
options
username: username;password: password;ntlm_domain: domain either http or https;url: complete path to the resource;workstation: workstation;- other options, which should be passed to Request module e.g. default headers.
params
This can be string or object
Example
const ntlm = require('request-ntlm-promise');
const URL = 'http://yourdomain.com'
const options = {
username: 'username',
password: 'password',
ntlm_domain: URL,
url: `${URL}/path/to/resource`
};
const json = {
// whatever object you want to submit
};
ntlm.post(options, json).then(console.log)
// or use async/await
const data = await ntlm.post(options, json)
console.log(data)###Notes
The core of this reposotory comes from request-ntlm which was imporoved by request-ntlm-continued. Here you can find complete refactor of both with ability to use promises.