
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Simple to use:
var dasu = require('dasu')
var req = dasu.req
// same params as Node's require('http').request
var params = {
method: 'GET',
protocol: 'http',
hostname: 'uinames.com',
port: 80,
path: '/api/',
}
req(params, function (err, res, data) {
console.log(res.statusCode)
console.log(res.headers)
var json = JSON.parse(data)
console.log(json)
// eg: {"name":"Milica","surname":"Maslo","gender":"female","region":"Slovakia"}
})
// turn auto-follow redirects off
dasu.follow = false
// force mode 'node', 'browser', 'auto'
// (useful with Electron etc)
dasu.mode = 'auto' // uses window.XMLHttpRequest if available
https://runkit.com/talmobi/runkit-npm-dasu
Using XMLHttpRequest or Node's http libraries under the hood, dasu aims to streamline your basic xhr for both contexts. It provides the familiar structure to Node's http library (http://devdocs.io/node/http#http_http_request_options_callback)
Test your client side request/fetch/xhr logic on the server side with the same api you're using on the client.
https://github.com/visionmedia/superagent
from npm
npm install --save dasu
from source
git clone https://github.com/talmobi/dasu
cd dasu
npm install
git clone https://github.com/talmobi/dasu
cd dasu
npm install
npm test
FAQs
Consistent xhr API for both client and server (http.request)
The npm package dasu receives a total of 154,698 weekly downloads. As such, dasu popularity was classified as popular.
We found that dasu 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.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.