title: need to mock POST request in cypress
body: <p>UPDATED 9/16:
  I've reworded my question. I'm trying to use cypress to test a work application that has an Angular frontend(http://localhost:4200) and a .NET Core backend (http://localhost:5000).</p>
  <p>When the app starts, a login page loads with username and password fields. The cypress code test fills in the username and password and clicks the submit button, as show in my code below.</p>
  <p>When the login (submit) button is clicked, it triggers a POST request to the .NET Core backend. The request submits the username and password and if the user is verified, a token comes back in response. The token is added to session storage and the user is logged in. It is this token value in the session storage that signifies the user is logged in. With the token added, the user gets redirected to the homepage.</p>
  <p>Now the backend is NOT running. I need to simulate this POST request so the cypress test can get to the actual homepage.</p>
  <p>I think I need to stub this POST request but I can't get this code to work. The request just aborts and looking at the console it says the request was not stubbed.</p>
  <p>Here's my updated cypress code:</p>
  <pre><code>  const username = 'johndoe';
    const password = 'pass1234';
    
    cy.server();
    cy.get('h1').should('contain', 'Login');
    cy.get('input[placeholder=Username]').type(username);
    cy.get('input[placeholder=Password]').type(password);
    cy.get('button[type=submit]').click();  
    cy.route({
      method: 'POST',
      url: 'http://localhost:5000/Authentication/Login',
      response: {
        access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' // some random characters
      }
    });
  </code></pre>