1.2.3 • Published 9 months ago

ccurllib v1.2.3

Weekly downloads
115
License
Apache-2.0
Repository
github
Last release
9 months ago

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/my/path',
  qs: {
    a:1,
    b:2
  },
  headers: {
    myheader: 'x'
  },
  method: 'get'
}
const response = await cc.request(opts)

or if doing IAM requests, call .iamRequest() instead

const cc = require('ccurllib')
const opts = {
  url: 'https://myapi.myserver.com/my/path',
  qs: {
    a:1,
    b:2
  },
  headers: {
    myheader: 'x'
  },
  method: 'get'
}
const response = await cc.request(opts, 'MYIAMKEY')

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.

1.2.3

9 months ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago