Installations
npm install tiny-json-http
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.15.0
NPM Version
9.5.0
Score
98.8
Supply Chain
93
Quality
76.1
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
brianleroux
Download Statistics
Total Downloads
14,704,826
Last Day
11,994
Last Week
48,461
Last Month
208,568
Last Year
2,030,327
GitHub Statistics
173 Stars
149 Commits
18 Forks
12 Watching
4 Branches
10 Contributors
Bundle Size
22.37 kB
Minified
7.08 kB
Minified + Gzipped
Package Meta Information
Latest Version
7.5.1
Package Id
tiny-json-http@7.5.1
Unpacked Size
42.29 kB
Size
10.41 kB
File Count
3
NPM Version
9.5.0
Node Version
18.15.0
Publised On
29 Mar 2023
Total Downloads
Cumulative downloads
Total Downloads
14,704,826
Last day
1.2%
11,994
Compared to previous day
Last week
-2.4%
48,461
Compared to previous week
Last month
11.2%
208,568
Compared to previous month
Last year
2.1%
2,030,327
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
7
tiny-json-http
Minimalist HTTP
client for GET
, POST
, PUT
, PATCH
and DELETE
JSON
payloads
- Zero dependencies: perfect for AWS Lambda
- Sensible default: assumes buffered JSON responses
- System symmetry: Node style errback API, or Promises for use with Async/Await
1npm i tiny-json-http --save
API
Read methods
tiny.get(options[, callback])
tiny.head(options[, callback])
tiny.options(options[, callback])
Write methods
tiny.post(options[, callback])
tiny.put(options[, callback])
tiny.patch(options[, callback])
tiny.del(options[, callback)]
*callback is optional, tiny methods will return a promise if no callback is provided
Options
url
requireddata
form vars fortiny.post
,tiny.put
,tiny.patch
, andtiny.delete
otherwise querystring vars fortiny.get
headers
key/value map used for headers (including support for uploading files withmultipart/form-data
)buffer
if set totrue
the response body is returned as a buffer
Callback values
err
a real javascriptError
if there was onedata
an object withheaders
andbody
keys
Promises
- if no
callback
is provided to the tiny-json-http methods, a promise is returned - perfect for use of async/await
Examples
With Async / Await
1var tiny = require('tiny-json-http') 2var url = 'http://www.randomkittengenerator.com' 3 4;(async function _iife() { 5 try { 6 console.log(await tiny.get({url})) 7 } catch (err) { 8 console.log('ruh roh!', err) 9 } 10})();
With Callback
1var tiny = require('tiny-json-http') 2var url = 'http://www.randomkittengenerator.com' 3 4tiny.get({url}, function _get(err, result) { 5 if (err) { 6 console.log('ruh roh!', err) 7 } 8 else { 9 console.log(result) 10 } 11})
Check out the tests for more examples! :heart_decoration:
Stable Version
Stable Version
7.5.1
HIGH
1
8.1/10
Summary
tiny-json-http missing SSL certificate validation
Affected Versions
>= 1.0.1, < 7.0.0
Patched Versions
7.0.0
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 3/20 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/build.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/brianleroux/tiny-json-http/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/brianleroux/tiny-json-http/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/brianleroux/tiny-json-http/build.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/brianleroux/tiny-json-http/build.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/build.yml:42
- Warn: npmCommand not pinned by hash: .github/workflows/build.yml:71
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 17 are checked with a SAST tool
Score
3.2
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to tiny-json-http
@types/tiny-json-http
TypeScript definitions for tiny-json-http
@studio/json-request
A tiny Node HTTP(S) request wrapper, for JSON requests and responses
tiny-typed-json
Simple, statically typed and ergonomic way to do async communications (events, workers, http requests) with json-rpc
mihawk
A tiny & simple mock server tool, support json,js,cjs,ts(typescript).