3.0.1 • Published 12 months ago
ccurllib v3.0.1
ccurllib
Utilities for the ccurl utility to provide:
- simple HTTPS request utility.
- api key cache persisted on user's disk
Usage
const cc = require('ccurllib')
const opts = {
url: 'https://myapi.myserver.com/_all_docs',
qs: {
limit: 4
},
headers: {
myheader: 'x'
},
method: 'get'
}
const response = await cc.request(opts)
// {
// status: 200,
// result: [ '_replicator', 'aaa', 'aardvark', 'alerts1' ]
// }
or for a Node.js stream:
const responseStream = await cc.requestStream(opts)
or if doing IAM requests, simply add an environment variable IAM_API_KEY
. The library will only exchange the IAM key for an access token if we don't have one cached or the cached one has expired.
Cached tokens are stored in .ccurl/keycache.json
. Simply remove this file to invalidate all cache keys.
3.0.1
12 months ago
3.0.0
12 months ago
1.4.0
12 months ago
2.0.0
12 months ago
1.3.1
1 year ago
1.3.0
1 year ago
1.2.4
1 year ago
1.2.3
2 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago