0.1.4 • Published 3 years ago

@flyweight.cloud/request v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Flyweight Request

Tests

A tiny zero dependency library for Node.js designed for interacting with popular JSON API's

Why

This library is designed for use in serverless functions where the size of the codebase has a strong affect on cold start times.

Example

Basic POST Request

import { post } from '@flyweight.cloud/request'

const httpTrigger: AzureFunction = async function (context: Context, req: HttpRequest): Promise<void> {
    const resp = await post("https://httpbin.com/anything", {
        json: {
            some: "Data"
        },
        bearerToken: "MY_JWT_TOKEN"
    })
    context.res = {
        body: resp.json
    }
}

Testing

npm install
npm test
0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago