
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-native-digest-fetch
Advanced tools
Fetch which responds to digest challenges, built for react native
This package implements digest authentication for react native using the fetch library
Digest fetch takes the same parameters as whatwg/fetch, with the addition of two parameters: username
and password
.
If the server does not respond with a www-authenticate
header this function will act exactly like fetch typically does.
npm install --save react-native-digest-fetch
import fetch from 'react-native-digest-fetch';
...
digestFetch('http://api.test.com/endpoint/', {
method: 'POST',
headers: {
'content-type': 'application/json',
'custom-header': 'anythingyouwant',
},
body: JSON.stringify({
hello: 'world',
}),
username: 'DIGEST_AUTH_USERNAME',
password: 'DIGEST_AUTH_PASSWORD',
});
If you would like to use your own http interaction library, and just need the Digest header value, you can import getDigestHeaderValue
like so:
import { getDigestHeaderValue } from 'react-native-digest-fetch';
and use it like so
getDigestHeaderValue(serverHeaders['www-authenticate'], { url, method, headers, username, password });
This library has been tested on react-native and vanilla node, but has not been tested on a front-end node project.
FAQs
Fetch which responds to digest challenges, built for react native
The npm package react-native-digest-fetch receives a total of 40 weekly downloads. As such, react-native-digest-fetch popularity was classified as not popular.
We found that react-native-digest-fetch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.