In my Angular application, there’s a requirement to send a specific HTTP header with an empty value. For example:
curl 'http://url:port/' \
-H 'Currencycode;'
Note: The header (Currencycode) has a semicolon (;) after its name, indicating an empty value.
Issue:
When I use Cypress to intercept the request, the header isn't sent. However, if I don't use cy.intercept, the header is sent as expected.
In the dev-tool the header is shown but it's actually not sent.
Desired behavior
The headers should be sent correctly, this seems to be working when using cypress 6.0 that is the first version where intercept is introduced. We also tested the version 12.11 and the issue is present.
Current behavior
I'm working on an end-to-end (E2E) test using Cypress to intercept an HTTP call with the following command:
In my Angular application, there’s a requirement to send a specific HTTP header with an empty value. For example:
Issue: When I use Cypress to intercept the request, the header isn't sent. However, if I don't use
cy.intercept
, the header is sent as expected.In the dev-tool the header is shown but it's actually not sent.
Desired behavior
The headers should be sent correctly, this seems to be working when using cypress 6.0 that is the first version where intercept is introduced. We also tested the version 12.11 and the issue is present.
Test code to reproduce
Server
Html page
Cypress test
Cypress Version
13.15.0
Node version
v22.9.2
Operating System
Windows 11 Pro 23H2 build: 22631.4317
Debug Logs
No response
Other
No response