2.5.6 • Published 2 years ago

@artiefuzzz/lynx v2.5.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@artiefuzzz/lynx

Lightweight HTTP client Inspired by @augu/orchid and centra

Installation

NPM:

npm install @artiefuzzz/lynx

Yarn:

yarn add @artiefuzzz/lynx

Usage

Note: Although we are using import { request } from '@artiefuzzz/lynx' it still is the same as using const { request } = require('@artiefuzzz/lynx')

Simple GET request:

import { request } from "@artiefuzzz/lynx";

const response = await request(
  "https://jsonplaceholder.typicode.com/todos/1"
).send();

console.log(response.json);

Simple POST request:

import { request, SendAs } from "@artiefuzzz/lynx";

const response = await request(
  "https://jsonplaceholder.typicode.com/posts",
  "POST"
)
  .body(
    {
      title: "Hello World!",
      body: "foobar",
      userId: 101,
    },
    SendAs.JSON
  )
  .send();

console.log(response.json);

If you encounter an issue please open a Issue on the Repository here

2.5.4

2 years ago

2.5.3

2 years ago

2.5.6

2 years ago

2.4.1

2 years ago

2.3.0

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

2.2.1

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.0.2

2 years ago

2.2.3

2 years ago

2.1.4

2 years ago

2.2.2

2 years ago

2.1.3

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.1.5

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago