Currently, I am utilizing an npm module to perform an API request:
const api_req = require('my-npm-module-that-makes-an-api-request');
However, I am seeking a way to modify the user-agent
used for requests generated internally by the npm module. Is there a method to achieve this without directly altering the module itself? For instance, is it feasible to define that all GET requests in my code should include a specific header, such as X, without needing to edit the request-generating code within the npm modules? Alternatively, are there alternative methods available to spoof my user agent?