1.1.6 • Published 5 years ago

hey-quest v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Hey Quest

npm version install size npm downloads

A promise based light-weight module that aims to make HTTP requests clean, intuitive, reusable and understandable.

Features

  • Easy to use
  • Clean syntax
  • Intuitive
  • Lightweight

Installing

Using npm:

$ npm install hey-quest

Using yarn:

$ yarn add hey-quest

Usage

We don't recommend using .then() and .catch

  // Import hey-quest
  const hey = require('hey-quest')
  
  // Declare an async function
  async function example(){
    try{
      // Configure the request and call it with ".do()"
      const res = await hey('https://jsonplaceholder.typicode.com/todos/1').do()
      // Convert the response into a javascript object
      const json = await res.json()
      // Logs the json
      console.log(json)
    }catch(e){
      // Inform an error if the request failed
      console.error(e)
    }
  }
  
  // Call the above function
  example()

Credits

Hey-quest is a library made by Francisco Cidade (@FranckCid).

Hey-quest is heavily inspired on axios.

License

MIT

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