Currenly when you use the fx:path_to_fixture or fixture:path_to_fixture we automatically set encoding to utf8.
It would be ideal to be able to control the encoding.
Since we are kind of conflating the cy.fixture encoding signature, we'll just go with a pathToFile,[encoding] signature.
cy.route({
url: "image.png",
response: "fx:path/to/file,binary" //<--- pass ,binary to signify binary encoding
headers: {
"content-type": "binary/octet-stream" // <-- TODO, we should automatically be setting these content-type headers when the encoding is manually specified
}
})
Currenly when you use the
fx:path_to_fixtureorfixture:path_to_fixturewe automatically set encoding toutf8.It would be ideal to be able to control the encoding.
Since we are kind of conflating the
cy.fixtureencoding signature, we'll just go with apathToFile,[encoding]signature.