0.11.0 • Published 11 months ago

@playful-systems/conduit v0.11.0

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

Conduit

An axios like http client that uses fetch under the hood.

NPM Package

Instantiating

import { Conduit } from '@packages/conduit';

const conduit = Conduit.create({
  baseURL: 'https://jsonplaceholder.typicode.com',
});

Requests

Conduit supports all the popular request methods.

GET

const response = await conduit.get('/posts');
const posts = response.data;

POST

const response = await conduit.post('/posts', {
  title: 'foo',
  body: 'bar',
  userId: 1,
});
const post = response.data;

PUT

const response = await conduit.put('/post', {
  id: 1,
  title: 'foo',
  body: 'bar',
  userId: 1,
});

PATCH

const response = await conduit.patch('/post', {
  id: 1,
  title: 'foo',
});

DELETE

const response = await conduit.delete('/post', {
  id: 1,
});
0.11.0

11 months ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.0

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.3

2 years ago

0.0.0

2 years ago