An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# node-api-client
A basic node REST api client based on [superagent](http://visionmedia.github.io/superagent/).

[![Build Status](https://travis-ci.org/intactile/node-api-client.svg?branch=master)](https://travis-ci.org/intactile/node-api-client)
[![Code Climate](https://codeclimate.com/github/intactile/node-api-client/badges/gpa.svg)](https://codeclimate.com/github/intactile/node-api-client)
[![Test Coverage](https://codeclimate.com/github/intactile/node-api-client/badges/coverage.svg)](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);
});
```