1.0.2 • Published 6 months ago

@dabble/rest-client v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

A library for working with JSON REST APIs. This function creates a REST API client that can be used to make requests to the specified URL. It returns an object with methods for making GET, POST, PUT, PATCH, and DELETE requests.

Examples:

const api = createRestAPI('https://api.example.com');
const data = await api.get('/users').send();
const user = await api.post('/users').body({ name: 'Alice' }).send();
const user = await api.post('/users').send({ name: 'Alice' });
await api.delete('/users').query({ id: 123 }).send();
1.0.2

6 months ago

1.0.1

10 months ago

1.0.0

11 months ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago