Axios

  1. Install Axios: $ npm install axios

  2. Create a json file in public folder such as public/api/test.json

  3. get method:

    • import axios from "axios";

    • axios.get('/api/test.json').then().catch()

Notice: axios.get( 'full name with json')

Last updated