How to use 2 instances of Axios with different baseURL in the same app (vue.js)

You’ll want to create a new instance of Axios with a custom config for each API you want that has a distinct baseURL.

var instance = axios.create({
  baseURL: 'https://example.com/api/',
  timeout: 1000,
  headers: {'X-Custom-Header': 'foobar'}
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)