Skip to content

Modify headers and status code but not stubbing response #190

Closed
@fvanwijk

Description

@fvanwijk

I have an XHR request that responds normally with a status 200 and some data.
There is one case where the response is enriched with some header data. I want to simulate this case.

This is the mock setup:

cy.server().route({
  method: 'POST',
  url: /some-url/,
  headers: { key: 'value' }
});

The resulting call is a non stubbed call but also the key: value headers are missing. They are not missing when I add a stubbed response to the route config.
The same happens with status.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions