Overview:
The Nuxt HTTP module is a module for the Nuxt framework that provides a universal way to make HTTP requests to the API backend. It supports Nuxt 2, and Nuxt 3 users can use the new isomorphic $fetch API.
Features:
- Fluent ky API: The module extends the fluent ky API with enhancements and shortcuts.
- Customizable options: Highly customizable options support for base URL.
- Proxy cookies and headers: Automatically proxies cookies and headers when making requests from the server-side.
- Best practices for token sharing: Provides best practices to avoid token sharing when making server-side requests.
- Proxy support for easier deployment: Easy proxy support to avoid CORS problems and make deployment easier.
Installation:
To install the Nuxt HTTP module, follow these steps:
Clone this repository:
git clone [repository URL]
Install dependencies using yarn:
yarn install
Start the development server:
yarn dev
Access the development server at http://localhost:3000/mounted.
To contribute to the documentation:
Go into the docs folder:
cd docs
Install dependencies using yarn:
yarn install
Start the development server:
yarn dev
Summary:
The Nuxt HTTP module provides a convenient way to make HTTP requests to the API backend in the Nuxt framework. It offers a fluent ky API, customizable options for base URL, automatic proxying of cookies and headers, best practices for avoiding token sharing, and easy proxy support for deployment. The module is easy to install and use, making it a valuable tool for developers working with Nuxt.