Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
bare-fetch
Advanced tools
Minimal WHATWG Fetch implementation for Bare.
npm i bare-fetch
fetch(link)
link
must be a string containing an http or https url
The function returns a Promise
that resolves to a Response
object .
The Response wraps a Readable
stream.
import fetch from 'bare-fetch'
const res = await fetch('https://api.restful-api.dev/objects/7')
console.log(await res.text())
fetch(link, { method, body, headers })
Only 'GET'
, 'POST'
and 'PUT'
are currently supported.
Class: Response
response.buffer()
Consumes the stream and returns a buffer.
response.text()
Consumes the stream, parses it as utf8 and returns a string.
response.json()
Consumes the stream, parses it as json and returns a js object.
response.headers
The headers on the response.
response.body
The Readable
stream wrapped by the response.
response.bodyUsed
A boolean property that tracks whether the stream has already been consumed.
response.status
The http status code of the response.
response.redirected
A boolean property that tracks whether the request has been redirected to a different URL.
Apache-2.0
FAQs
WHATWG Fetch implementation for Bare
The npm package bare-fetch receives a total of 110 weekly downloads. As such, bare-fetch popularity was classified as not popular.
We found that bare-fetch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.