Quickrest - Automatic REST client

- 1 min

Quickrest is a simple JavaScript library that makes quickly building REST clients easy. For example, you might have a blog API with the following endpoints:

With quickrest, you simply describe the layout of your API, and the library will create a javascript object with properties and functions that match the API’s semantics.

import quickrest from 'quickrest'

const api = quickrest({
  root: 'https://api.example.com',
  endpoints: [
    'users',
    'users/posts',
    'users/posts/comments',
    'posts',
    'posts/comments',
    'comments',
  ],
})

// get nested resource
// GET /users/9000/posts/3
api.users(9000).posts(3).get()

The library is primarily meant to be used in a browser environment and is a WIP.


Download the lib from NPM or log issues/create PRs on Github

Crisson Jno-Charles

Crisson Jno-Charles

Fullstack Software Engineer specializing in Scala, JavaScript, and Java development

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google pinterest medium vimeo