@js-from-routes/redaxios
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

@js-from-routes/redaxios

Define path helpers to make API requests or interpolate URLs


This package extends @js-from-routes/client to use redaxios.

It's useful when already using redaxios, for consistency when using the response object directly.

Installation 💿

npm i @js-from-routes/redaxios # yarn add @js-from-routes/redaxios

Usage 🚀

import { formatUrl, request } from '@js-from-routes/redaxios'

formatUrl('/video_clips/:id/download', { id: 5 }) == '/video_clips/5/download'

const video = await request('get', '/video_clips/:id', { id: 5 })

License

The gem is available as open source under the terms of the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i @js-from-routes/redaxios

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

6.46 kB

Total Files

7

Last publish

Collaborators

  • elmassimo