Response selection using request cookie#52
Conversation
|
@kryvel thanks for the PR. Can you explain more your intention? The Prefer header is parsed using parse-prefer-header, this won't work if you just pass all the |
|
In some cases (eg. automated headless testing in browser via selenium) there is no possibility to send additional headers from client script. But possible to set cookie in browser with additional data, name of example or status code in this case. Such cookie will be sent by the client script to the mocker server. parse-prefer-header parse only content of Prefer header. So, if Cookie header will contain the same data as Prefer header, it will work just fine.
|
|
Understood. I think that there must be a predefined cookie with the same content of the For example, an What do you think? PS. Sorry about the delay, I couldn't pay any attention to spare-time projects.. |
In addition to the existing Prefer header functionality, I added the same but with a cookie.
Prefer header has greater priority over cookie