Need private packages and team management tools?Check out npm Teams »

raxios

1.0.10 • Public • Published

raxios

npm npm

Raxios is a wrapper of axios extending some functionallity of url pattern matching used in express library.

Installation

npm install --save raxios

Usage

import raxios from 'raxios'
 
raxios.get('http://myapi.com/:foo/search', {
  urlParams: {
    foo: 'bar'
  }
}).then(res => console.log(res.data))

This will produce a request to http://myapi.com/bar/search

Usage with query params

import raxios from 'raxios'
 
raxios.get('http://myapi.com/:foo/search', {
  urlParams: {
    foo: 'bar'
  },
  params: {
    q: 'soccer'
  }
}).then(res => console.log(res.data))

This will produce a request to http://myapi.com/bar/search?q=soccer

Install

npm i raxios

DownloadsWeekly Downloads

10

Version

1.0.10

License

MIT

Unpacked Size

3.04 kB

Total Files

4

Last publish

Collaborators

  • avatar