Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
sync-fetch
Advanced tools
Synchronous wrapper around the Fetch API. Uses node-fetch
under the hood, and for some input-parsing code and test cases too.
npm install sync-fetch
In the browser, a browserify bundle can be loaded from CDNs like unpkg.com.
<script src="https://unpkg.com/sync-fetch"></script>
<script src="https://unpkg.com/sync-fetch@VERSION"></script>
const fetch = require('sync-fetch')
const metadata = fetch('https://doi.org/10.7717/peerj-cs.214', {
headers: {
Accept: 'application/vnd.citationstyles.csl+json'
}
}).json()
// arrayBuffer(), blob(), buffer(), json(), and text() supported
Stream
or Blob
as input body since they cannot be read or serialized synchronouslyFormData
as input body yet as it has no built-in method to be serializedagent
option as its value cannot be serializedtextConverted()
method on SyncResponse
and SyncRequest
XMLHttpRequest
is pretty limited. Supported are:
method
body
headers
credentials
(but not omit
)timeout
buffer()
and textConverted()
methods are not supportedFAQs
Synchronous version of the Fetch API
We found that sync-fetch demonstrated a healthy version release cadence and project activity because the last version was released less than 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.