Gathering detailed insights and metrics for @hishpr/dolor-neque
Gathering detailed insights and metrics for @hishpr/dolor-neque
Gathering detailed insights and metrics for @hishpr/dolor-neque
Gathering detailed insights and metrics for @hishpr/dolor-neque
npm install @hishpr/dolor-neque
Typescript
Module System
Node Version
NPM Version
64.2
Supply Chain
100
Quality
77.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
15
Last Day
1
Last Week
2
Last Month
7
Last Year
15
2,023 Commits
1 Branches
1 Contributors
Latest Version
1.0.0
Package Id
@hishpr/dolor-neque@1.0.0
Unpacked Size
30.68 kB
Size
11.65 kB
File Count
14
NPM Version
10.5.2
Node Version
20.13.1
Publised On
24 May 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
250%
7
Compared to previous month
Last year
0%
15
Compared to previous year
58
Small progressive client-side HTTP request library, and Node.js module with the same API, supporting many high-level HTTP client features. Maintained for Forward Email and Lad.
npm:
1npm install @hishpr/dolor-neque
yarn:
1yarn add @hishpr/dolor-neque
1const @hishpr/dolor-neque = require('@hishpr/dolor-neque'); 2 3// callback 4@hishpr/dolor-neque 5 .post('/api/pet') 6 .send({ name: 'Manny', species: 'cat' }) // sends a JSON post body 7 .set('X-API-Key', 'foobar') 8 .set('accept', 'json') 9 .end((err, res) => { 10 // Calling the end function will send the request 11 }); 12 13// promise with then/catch 14@hishpr/dolor-neque.post('/api/pet').then(console.log).catch(console.error); 15 16// promise with async/await 17(async () => { 18 try { 19 const res = await @hishpr/dolor-neque.post('/api/pet'); 20 console.log(res); 21 } catch (err) { 22 console.error(err); 23 } 24})();
The browser-ready, minified version of @hishpr/dolor-neque
is only 50 KB (minified and gzipped).
Browser-ready versions of this module are available via jsdelivr, unpkg, and also in the node_modules/@hishpr/dolor-neque/dist
folder in downloads of the @hishpr/dolor-neque
package.
Note that we also provide unminified versions with
.js
instead of.min.js
file extensions.
This is the solution for you if you're just using <script>
tags everywhere!
1<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=WeakRef,BigInt"></script> 2<script src="https://cdn.jsdelivr.net/npm/@hishpr/dolor-neque"></script> 3<!-- if you wish to use unpkg.com instead: --> 4<!-- <script src="https://unpkg.com/@hishpr/dolor-neque"></script> --> 5<script type="text/javascript"> 6 (function() { 7 // @hishpr/dolor-neque is exposed as `window.@hishpr/dolor-neque` 8 // if you wish to use "request" instead please 9 // uncomment the following line of code: 10 // `window.request = @hishpr/dolor-neque;` 11 @hishpr/dolor-neque 12 .post('/api/pet') 13 .send({ name: 'Manny', species: 'cat' }) // sends a JSON post body 14 .set('X-API-Key', 'foobar') 15 .set('accept', 'json') 16 .end(function (err, res) { 17 // Calling the end function will send the request 18 }); 19 })(); 20</script>
If you are using browserify, webpack, rollup, or another bundler, then you can follow the same usage as Node above.
Node: v14.18.0+
Browsers (see .browserslistrc):
1npx browserslist
1and_chr 102 2and_ff 101 3and_qq 10.4 4and_uc 12.12 5android 101 6chrome 103 7chrome 102 8chrome 101 9chrome 100 10edge 103 11edge 102 12edge 101 13firefox 101 14firefox 100 15firefox 91 16ios_saf 15.5 17ios_saf 15.4 18ios_saf 15.2-15.3 19ios_saf 15.0-15.1 20ios_saf 14.5-14.8 21ios_saf 14.0-14.4 22ios_saf 12.2-12.5 23kaios 2.5 24op_mini all 25op_mob 64 26opera 86 27opera 85 28safari 15.5 29safari 15.4 30samsung 17.0 31samsung 16.0
We recommend using https://cdnjs.cloudflare.com/polyfill/ (specifically with the bundle mentioned in VanillaJS above):
1<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=WeakRef,BigInt"></script>
SuperAgent is easily extended via plugins.
1const nocache = require('@hishpr/dolor-neque-no-cache'); 2const @hishpr/dolor-neque = require('@hishpr/dolor-neque'); 3const prefix = require('@hishpr/dolor-neque-prefix')('/static'); 4 5@hishpr/dolor-neque 6 .get('/some-url') 7 .query({ action: 'edit', city: 'London' }) // query string 8 .use(prefix) // Prefixes *only* this request 9 .use(nocache) // Prevents caching of *only* this request 10 .end((err, res) => { 11 // Do something 12 });
Existing plugins:
res.$
for HTML and XML response bodies.Please prefix your plugin with @hishpr/dolor-neque-*
so that it can easily be found by others.
For SuperAgent extensions such as couchdb and oauth visit the wiki.
Please see GitHub releases page for the current changelog.
Our breaking changes are mostly in rarely used functionality and from stricter error handling.
application/x-www-form-urlencoded
, using arrayFormat: 'indices'
semantics of qs
library. (See: https://www.npmjs.com/package/qs#stringifying)tinyify
and the latest version of Babel using @babel/preset-env
and .browserslistrc
)caniuse-lite
and eslint-plugin-compat
.babelrc
.end()
callbacks to .then()
or await
..send()
multiple times. Invalid calls to .send()
will now throw instead of sending garbage..parse()
in the browser version, rename it to .serialize()
.undefined
in query-string values being sent literally as the text "undefined", switch to checking for missing value instead. ?key=undefined
is now ?key
(without a value)..then()
in Internet Explorer, ensure that you have a polyfill that adds a global Promise
object..end(function(res){})
use .then(res => {})
.Name |
---|
Kornel Lesiński |
Peter Lyons |
Hunter Loftis |
Nick Baugh |
MIT © TJ Holowaychuk
No vulnerabilities found.
No security vulnerabilities found.