playwright-java icon indicating copy to clipboard operation
playwright-java copied to clipboard

[Feature]: allow to define multiple times the same header in route.fulfill

Open robstoll opened this issue 5 months ago • 0 comments

🚀 Feature Request

There is currently no way to define multiple times the same header in route.fulfill.

I first hoped I could trick it by using different cases but com/microsoft/playwright/impl/RouteImpl.java:214 uses headers.put(h.getKey().toLowerCase(), h.getValue());

I would expect that I can define headers in both ways, via Map<String, String> or via List<HttpHeader> (likewise one can use response.allHeaders() and response.headersArray()

Example

I have a test where I want to make sure that my implementation to detect multiple headers work. That's why I use route.fulfill and would like to define a header multiple times.

Motivation

see above

robstoll avatar Jun 06 '25 09:06 robstoll