alifc
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

Minimal Aliyun FC Utility

For those who prefer a simpler http client than @alicloud/fc2.

Install

npm i alifc

Usage

HttpBase is wrapper of aixos that set the '/version/proxy/' baseURL for you.
HttpFunc also sign the request to pass function Authorization.

const { HttpBase, HttpFunc } = require('alifc')
const func = new HttpFunc(
  accessKey,
  accessKeySecret
  endpoint
)

func.get('/service/func') // axios Promise

Test requirements

  • A fc service named 'test'
  • 2 functions under 'test:
    • foo: which use function authorization
    • bar: which accept anonymous request
  • 3 environment variables (or set them via .env):
    • FC_ACCESS_KEY: accessKey,
    • FC_ACCESS_KEY_SEC: accessKeySecret,
    • FC_ACCESS_EP: endpoint

Reference

Readme

Keywords

Package Sidebar

Install

npm i alifc

Weekly Downloads

1

Version

0.2.3

License

MIT

Unpacked Size

14.2 kB

Total Files

9

Last publish

Collaborators

  • clarkttfu