How to dynamically set baseURL
See original GitHub issueSome of my clients will receive some notifications from their servers, so I need to dynamically set the baseURL
for each one of them, the only way I find it right now is passing them in the localStorage
and consuming that before config are set.
Is there another way to dynamically change the baseURL?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Setting axios base url dynamically - reactjs - Stack Overflow
Make a function that returns the Axios instance with a dynamic base URL, like this: custom-axios.js import axios from 'axios'; ...
Read more >Is it possible to have Dynamic baseURL? - support - HUGO
You can set a baseURL by passing the -b flag in the hugo command. See: gohugo.io. hugo. hugo hugo builds your site Synopsis...
Read more >Setting axios base url dynamically · Issue #2448 - GitHub
i am getting base url from asyncstorage and i want to set it as base url for axios instance. ... const axiosInstance =...
Read more >Steps for configuration of Base URL dynamically while ...
Hi All,. I wanted to configure the Base URL dynamically while consuming REST API in our module. Are there any steps that I...
Read more >Cypress Dynamic BaseURL - ProgramsBuzz
The cypress URL can be dynamically used and set as the base URL in the cypress config to load the URL from the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No problem @christianmalek, don’t worry, I already found a way to change it by using
localStorage
.Since I use
electron with vue
, there is no secure problem, thank you for your answer!@marceloavf Sorry for the late answer. I forgot this issue…
I just revisited the source code and come to the conclusion that I won’t change it. I could make the baseURL accessible and create a public method in the store so that you can change the baseURLs of the resources before you create the store. But this will make the code dirty and hacky and that’s not what I want.
Maybe someone else has a better idea. But for now I can’t help you further. 😦