[Vuejs]-How to use a different baseUrl for one particular call?

0👍

Yes.

baseURL will only be prepended to url if url is not absolute.

Lets say you have defined a baseurl as https://google.com.

Then calling a relative url like axios.get('/user?ID=12345') will call baseurl+url like this: https://google.com/user?ID=12345.

But calling an absolute url like axios.get('https://facebook.com/user?ID=12345') will only call url like this: https://facebook.com/user?ID=12345, even if you have baseurl defined.

Leave a comment