Closed mikicho closed 1 month ago
After I thought about it, I think we should add an extra argument or a way to pass the raw headers more straightforwardly.
I think that the rawHeaders
case is an edge case; most users don't care about them very much and use the headers
object.
So, instead of utilizing an internal implementation of Node.js, which may break at some point without notice, we should expose a proper API for this.
I don't think we should "dirty" the withResponse
function for this edge case, but maybe add another function or another solution.
Closing in favor of #598.
The![image](https://github.com/mswjs/interceptors/assets/11459632/f27e578f-37e2-4000-8e39-2dd93a82c824)
Response
merges the headers, so we don't get the original rawHeaders array.@kettanaito WDYT?
P.S: I fixed a small error in headers, set-cookie is not an array. (easy fix)