@digibear/curl
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

@digibear/curl

A super simple curl utility written in typescript.

This was originally written for a series of shell scripts I wrote using node.

curl(address, options)

const {curl} = require("@digibear/curl");

(async () => {
  const results = await curl("http://www.example.com", {
    mode: "GET",
    headers: {
      "api-key": "xxxxx-xxxxx-xxxxx",
    },
    flags: ["headers"]
  })
})().catch(err => {
  console.error(err);
  process.exit(1)
})

Options

  • mode(string)

  • headers(Object)

    • key: value
  • user(Object)

    • user

    • password

  • body(Object)

    • key: value
  • flags(array)

Readme

Keywords

Package Sidebar

Install

npm i @digibear/curl

Weekly Downloads

3

Version

1.1.6

License

MIT

Unpacked Size

3.97 kB

Total Files

5

Last publish

Collaborators

  • lcanady