yfe-server

1.0.7 • Public • Published

Installation

import Server from 'yfe-server'

Usage

class myServer extends Server {
  async getInformation(params, options) {
    try {
      let result = await this.axios('get', 'http://yourbaseurl.com', '/getinformation',params, options)
      return result
    } catch(err) {
      throw err
    }
  }
  
}

Api

this.axios(method, baseUrl, url, [params, options])

parameters

  1. params: are the URL parameters to be sent with the request, Must be a plain object or a URLSearchParams object also see params in axios
  2. options: it can overwrite the options in aixos, so you can add whatever you what when you send a request

Readme

Keywords

none

Package Sidebar

Install

npm i yfe-server

Weekly Downloads

2

Version

1.0.7

License

ISC

Unpacked Size

9.49 kB

Total Files

7

Last publish

Collaborators

  • tombflylee