POST request inside GET request possible? #2698
              
                Unanswered
              
          
                  
                    
                      ninjaswithglocks
                    
                  
                
                  asked this question in
                General
              
            Replies: 1 comment 1 reply
-
| You can use  | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Is there any way to chain a query where you can do a POST request (or any request really) immediately after a GET request? I know about dependent queries but that doesn't let you do a request in the response of another request I think.
My backend is powered by Laravel Sanctum's cookie-based authentication, so it needs to do a GET request to gain the csrf cookie and then immediately login. It looks like this:
Is it possible to simulate something like this with the React-Query library?
It's only needed for the /login POST part of my application so if it's not possible to do this approach with React-Query I can very well keep using axios in this one specific use case.
Beta Was this translation helpful? Give feedback.
All reactions