0.0.2 • Published 9 years ago

api_client v0.0.2

Weekly downloads
10
License
ISC
Repository
github
Last release
9 years ago

Wrapper over request module to build simple Web API clients.

Example:

    var api_client = require('./api_client'),
        clientOpts = {
            baseURL: 'http://jsonplaceholder.typicode.com/',
            timeout: 30000
        };

    api_client.createAPIPClient(clientOpts).request('/posts/1')
        .then(function (data) {
            console.log('Received response: ' + data.body);
        })
        .catch(function (error) {
            console.log('Request finished with error: ' + error);
        }
    );
0.0.2

9 years ago

0.0.1

9 years ago