How to setup your module

Checkout the Nuxt documentation for more information about installing and using modules.


Add @nuxt/http dependency to your project:

yarn add @nuxt/http
npm install @nuxt/http

Then add it to the modules section in your nuxt.config.js:

export default {
  modules: ['@nuxt/http']

That's it! You can now use $http in your Nuxt app ✨


Add a http object to your nuxt.config.js to configure global options which will be applied to all requests

export default {
  modules: [

  http: {
    // proxyHeaders: false

See http's options.

Note that this module does not currently support IE 11 because of using ky (open issue)

Edit this page on GitHub Updated at Wed, Mar 24, 2021