Example of using custom fetch #1516
              
                
                  
                  
                    Answered
                  
                  by
                    drwpow
                  
              
          
                  
                    
                      jludwiggreenaction
                    
                  
                
                  asked this question in
                Q&A
              
            -
| 
         I'd like to use  Is there any documentation or example I could be directed towards to get started with this? Thanks.  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            drwpow
          
      
      
        Jan 25, 2024 
      
    
    Replies: 1 comment
-
| 
         Oh the  It implements the  const client = createClient({
  fetch(url: string, options: RequestInit) {
    return axios({ url, ...options });
  }
});Here is the line of code that gets called at runtime.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        jludwiggreenaction
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Oh the
anytype could probably be improved; that’s just to prevent errors with 3rd-party libraries.It implements the
fetch()API perfectly, so if you wanted to connect it to Axios, you’d have to add a fetch-compatible wrapper, like:Here is the line of code that gets called at runtime.