1.0.1 • Published 4 years ago

fastify-got v1.0.1

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

fastify-got

Simple plugin to work with Got within Fastify. Supports all features from got.

Install

npm i fastify-got

Usage

const fastify = require('fastify')();

fastify.register(require('fastify-got'));

(async () => {
  try {
    const response = await fastify.got('https://sindresorhus.com');
    console.log(response.body);
    //=> '<!doctype html> ...'
  } catch (error) {
    console.log(error.response.body);
    //=> 'Internal server error ...'
  }
})();

License

Licensed under MIT.

1.0.1

4 years ago

1.0.0

4 years ago