0.1.3 • Published 3 years ago

@crosspath/yambus-fetch v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Yambus

This package contains adapter for generating requests with fetch function, used by Yambus.

Yambus generates functions for obtaining paths and making requests to your application.

See more at Yambus project page.

Installation

$ yarn add @crosspath/yambus @crosspath/yambus-fetch

Usage

Assume you have generated object with routes in file routes.

import Routes from 'routes'

// Send request with positional arguments:
Routes.route_name('test-value').then(body => console.log(body))
// Or with object:
Routes.route_name({url: 'test-value'}).then(body => console.log(body))

These functions return Promise. Variable body here contains response data. Expected request & response format is JSON.

Contributing

Bug reports and pull requests are welcome on GitHub at github.com/crosspath/yambus.

Please do not change version number in pull requests.

License

This package is available as open source under the terms of the MIT License.

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago