Socket
Book a DemoInstallSign in
Socket

ccurllib

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ccurllib

Utility library for ccurl

4.0.1
latest
Source
npmnpm
Version published
Weekly downloads
117
50%
Maintainers
1
Weekly downloads
 
Created
Source

ccurllib

Utilities for the ccurl utility to provide:

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

Usage

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:

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.

Keywords

ccurl

FAQs

Package last updated on 17 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.