axios get baseurl from current url code example Example: axios configure base url axios.defaults.baseURL = '/api/';