Customize Axios #1110
              
                
                  
                  
                    Answered
                  
                  by
                    kronst
                  
              
          
                  
                    
                      chengjunjian2020
                    
                  
                
                  asked this question in
                Q&A
              
            
            
              Customize Axios
            
            #1110
          
          
        -
| How to request Axios to be provided by me when generating, that is, I provide the path and he can call it? | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            kronst
          
      
      
        Mar 24, 2025 
      
    
    Replies: 1 comment 1 reply
-
| You can configure Axios by providing config in the Api class constructor const client = new Api({
    baseURL: API_URL,
    timeout: 10000,
    paramsSerializer: {
        indexes: null,
    },
});If you need to customize interceptors you can use created instance of the client: client.instance.interceptors.request.use(
    /* your interceptor config */
); | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        smorimoto
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
You can configure Axios by providing config in the Api class constructor
If you need to customize interceptors you can use created instance of the client: