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

digest-fetch

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digest-fetch - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

2

package.json
{
"name": "digest-fetch",
"version": "1.1.4",
"version": "1.1.5",
"description": "digest auth request plugin for fetch/node-fetch also support http basic auth authentication",

@@ -5,0 +5,0 @@ "main": "digest-fetch-src.js",

@@ -22,10 +22,23 @@ # digest-fetch

```
// Use require
const DigestFetch = require('digest-fetch')
// In browser: const DigestFetch = window.DigestFetch;
// Use import
import * as DigestFetch from "digest-fetch"
// In browser
const DigestFetch = window.DigestFetch;
```
Initialize with option and credential
#### Http Basic Authentication
Create a client using basic authentication challenge
```
const client = new DigestFetch('user', 'password', { basic: true })
client.fetch(url, options).then(res => res.json).then(console.dir)
```
#### Digest Access Authentication
Create a digest authentication request client with default options

@@ -58,9 +71,2 @@

Create a client using basic authentication challenge
```
const basic_auth_client = new DigestFetch('user', 'password', { basic: true })
```
Do request same way as fetch or node-fetch

@@ -85,3 +91,2 @@

.catch(e=>console.error(e))
```

@@ -88,0 +93,0 @@

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