https://github.com/intactile/node-api-client
A basic node REST api client based on superagent
https://github.com/intactile/node-api-client
client-lib-js nodejs rest superagent
Last synced: 5 months ago
JSON representation
A basic node REST api client based on superagent
- Host: GitHub
- URL: https://github.com/intactile/node-api-client
- Owner: intactile
- License: apache-2.0
- Created: 2016-11-29T16:43:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-15T10:54:39.000Z (almost 4 years ago)
- Last Synced: 2025-09-30T11:58:16.930Z (9 months ago)
- Topics: client-lib-js, nodejs, rest, superagent
- Language: JavaScript
- Size: 128 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-api-client
A basic node REST api client based on [superagent](http://visionmedia.github.io/superagent/).
[](https://travis-ci.org/intactile/node-api-client)
[](https://codeclimate.com/github/intactile/node-api-client)
[](https://codeclimate.com/github/intactile/node-api-client/coverage)
## Install
```bash
npm install @intactile/node-api-client
```
## Usage
```javascript
import ApiClient from '@intactile/node-api-client';
const apiClient = new ApiClient();
apiClient.post('users', { firstName: 'John', lastName: 'Doe' })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
```