api-client Installation node: $ npm i karmapa-api-client import ApiClient from 'karmapa-api-client'; const apiClient = new ApiClient({prefix: 'https://jsonplaceholder.typicode.com'}); apiClient.get('/posts', {params: {page: 1}}) .then((res) => console.log(res)); apiClient.post('/posts', {data: {blah: true}}) .then((res) => console.log(res));