# ccurllib

> Utility library for ccurl

Latest version **4.0.3** (published 2025-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ccurllib
pnpm add ccurllib
yarn add ccurllib
bun add ccurllib
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; has provenance.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.0.3 |
| Published | 2025-09-22 |
| First published | 2019-08-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Author | Glynn Bird |
| Maintainers | glynnbird |
| Keywords | ccurl |

## Links

- npm: https://www.npmjs.com/package/ccurllib
- Repository: https://github.com/glynnbird/ccurllib
- Homepage: https://github.com/glynnbird/ccurllib#readme
- Issues: https://github.com/glynnbird/ccurllib/issues
- npm.io page: https://npm.io/package/ccurllib

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 4.0.3 (latest) — 2025-09-22
- 4.0.2 — 2025-09-22
- 4.0.1 — 2025-06-17
- 4.0.0 — 2025-06-16
- 3.0.1 — 2024-07-31
- 3.0.0 — 2024-07-31
- 2.0.0 — 2024-07-31
- 1.4.0 — 2024-07-30
- 1.3.1 — 2024-07-26
- 1.3.0 — 2024-07-26
- 1.2.4 — 2024-07-12
- 1.2.3 — 2023-08-01
- 1.2.2 — 2023-01-12
- 1.2.1 — 2023-01-09
- 1.2.0 — 2022-11-16
- … 10 more at https://npm.io/package/ccurllib/versions

## README

# ccurllib

Utilities for the ccurl utility to provide:

- simple HTTPS request utility.
- api key cache persisted on user's disk

## Usage

```js
import * as ccurllib from 'ccurllib'
const opts = {
  url: 'https://myapi.myserver.com/_all_docs',
  qs: {
    limit: 4
  },
  headers: {
    myheader: 'x'
  },
  method: 'get'
}
const response = await ccurllib.request(opts)
// {
//   status: 200,
//   result: [ '_replicator', 'aaa', 'aardvark', 'alerts1' ]
// }
```

or for a Node.js stream:

```js
const responseStream = await ccurllib.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.

---
_Source: https://npm.io/package/ccurllib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
