Axios Module

screenshot of Axios Module
nuxt

Secure and easy axios integration for Nuxt 2

Overview

@nuxtjs/axios is a secure and easy Axios integration for Nuxt 2. It provides a seamless way to use Axios in Nuxt applications for both client and server-side requests.

Features

  • Automatically set base URL for client & server-side: The module automatically sets the base URL for Axios requests, making it easier to manage API endpoints.
  • Exposes setToken function to $axios: This feature allows setting authentication tokens globally and easily using the setToken function.
  • Automatically enables withCredentials: When requesting to the base URL, withCredentials is automatically enabled, ensuring proper handling of cookies.
  • Proxy request headers in SSR: The module allows proxying request headers during server-side rendering, making it easier to handle authentication or other custom headers.
  • Fetch Style requests: The module supports Fetch Style requests, providing a more modern approach to making API requests.
  • Integrated with Nuxt progress bar: The module is integrated with the Nuxt progress bar, providing a visual indication of API request progress.
  • Integrated with Proxy Module: It seamlessly integrates with the Nuxt Proxy Module, allowing easy proxying of API requests.
  • Auto retry requests with axios-retry: The module supports automatic retry of failed requests using the axios-retry library.
nuxt
Nuxt

nuxt.js is a lightweight and flexible JavaScript framework that allows developers to easily build dynamic and reactive user interfaces. Its intuitive syntax, modular architecture, and focus on performance make it a popular choice for modern web development.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.