1.2.6 • Published 3 years ago

axios-eve v1.2.6

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

axios-eve

Promise based HTTP client for api build up on eve-framework

Installing

Using npm:

$ npm install axios-eve

Example

// declare endpoits
let config =  [
        {
            "url": "area",
            "type": "eve",
            "methods": ["GET"]
        },
        {
            "url": "questions",
            "type": "eve",
            "methods": ["GET"]
        },
        {
            "url": "user",
            "type": "eve",
            "methods": ["GET"]
        },
        {
            "url": "user/admin",
            "type": "eve",
            "methods": ["POST"]
        },
        {
            "url": "area/{name}",
            "type": "eve",
            "methods": ["GET"] 
        }
    ]

let api = new Api({
  urls: config,
  baseURL: 'http://localhost:8000',
  headers: {
      'Cache-Control': 'no-cache'
  },
  timeout: 1500
})

// return areas
api.getArea({})

// return page 2 
api.getQuestions({page: 2})

// sort by name
api.getUser({sort: {name: 1}})
1.2.6

3 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago