Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Setting axios base url dynamically

axiosInstance.interceptors.request.use( async config => { config.baseURL=await getBaseUrl(); return config; }, error => Promise.reject(error) );

 
PREVIOUS NEXT
Tagged: #Setting #axios #base #url #dynamically
ADD COMMENT
Topic
Name
9+8 =