title: Cypress - log response data from an request after a click()
body: <p>Although I know this may not be considered as a best practice, but what I want to achieve is to silently delete a record from a database after the same was created throughout UI. In htat way I want to keep our test environment clear as much as possible and reduce the noise of test data. </p>
  
  <p>After my tests create a new record by clicking over the UI, I wait for POST request to finish and then I would like to extract the id from the response (so I can reuse it to silently delete that record by calling the <code>cy.request('DELETE', '/id')</code>).</p>
  
  <p>Here's a sample test I have put on as a showcase. I'm wondering why nothing is logged in this example.</p>
  
  <pre><code>it('GET cypress and log', () =&gt; {
    cy.server()
      .route('**/repos/cypress-io/cypress*')
      .as('getSiteInfo');
  
    cy.visit('https://www.cypress.io/dashboard');
  
    cy.get('img[alt="Cypress.io"]')
      .click()
      .wait('@getSiteInfo')
      .then((response) =&gt; {
        cy.log(response.body)
      })
  })
  </code></pre>
  
  <p>As far as I can see from here <a href="https://docs.cypress.io/api/commands/wait.html#Alias" rel="noreferrer">https://docs.cypress.io/api/commands/wait.html#Alias</a> this should be fine.</p>