Allow for recording user-agent request header
See original GitHub issueI know the readme clearly outlines the decision of omitting the user-agent
request header from recordings. It is reiterated in the comments:
// We never record user-agent headers as they are worse than useless -
// they actually make testing more difficult without providing any benefit (see README)
However, please bear with me 😄 . I’m testing a scraper, which requires setting the user-agent
header to a specific browser version. It would be useful if my recordings would capture that, so that if the header that I’m supposed to set explicitly is removed or changed, my tests will catch it.
I’d be willing to submit a PR for this, how do you guys feel about the following options:
- Add an
include_user_agent_reqheader
option tonock.recorder.rec()
- Only omit the
user-agent
header when aNodeJS
header is detected
Cheers!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
User-Agent - HTTP - MDN Web Docs - Mozilla
The User-Agent request header is a characteristic string that lets servers and network peers identify the application, operating system, ...
Read more >HTTP/1.1: Header Field Definitions
The Accept request-header field can be used to specify certain media types which are acceptable for the response. Accept headers can be used...
Read more >Syntax of User Agent in HTTP Header - Stack Overflow
I have Google Chrome Browser running version 89.0 The user agent of my browser displays the following string: Mozilla ...
Read more >UserAgent Modification Rule - Requestly
The User-Agent request header is most commonly used by servers to identify its client's application.
Read more >Using JMeter's HTTP Header Manager - BlazeMeter
The Header Manager lets you add or override HTTP request headers. Let's examine this process using a test plan which was previously recorded...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hey just a heads up that I’m out vacationing until 22nd, I’ll review open issues then 😃
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!