cypress-io / full-network-proxy

Demo repo for Cypress with full network stubbing support
https://github.com/cypress-io/cypress/pull/1931
5 stars 1 forks source link

Example with stub by POST body #6

Open bahmutov opened 6 years ago

bahmutov commented 6 years ago

Something like

cy.route({
  url: '/foo',
  method: 'POST',
  request: (r) => r.body === {bar: 'baz'}
  response: {
     some: 'mock response'
  }
})