Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

request-ntlm-promise

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-ntlm-promise

Make easy requests with NTLM authentication

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by31.13%
Maintainers
1
Weekly downloads
 
Created
Source

js-standard-style npm type definitions

Request-NTLM-promise

Ntlm authentication promise wrapper for the Request module. It authenticates each request via NTLM protocol.

The core of this reposotory comes from request-ntlm which was improved by request-ntlm-continued. Here you can find complete refactor of both with ability to use promises.

Usage

Install from npm
$ npm install request-ntlm-promise
Import
const ntlm = require('request-ntlm-promise');
// Typescript
import * as Request from '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

streamCallback

Optional. If provided then you will get a stream instead of promise. Useful if working with files.

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)

// or stream
ntlm.post(options, json, (response) => {
  reply(response)  // Hapi js handler
})

Keywords

FAQs

Package last updated on 26 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc