Skip to content

Commit

Permalink
lib/browser: log request headers
Browse files Browse the repository at this point in the history
  phantomas:network Network.requestWillBeSent > GET http://0.0.0.0:8888/headers.html [other] headers: {"Accept-Language":"en-GB","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.99 Safari/537.36 Phantomas/2.12.0"} +0ms
  • Loading branch information
macbre committed Aug 9, 2024
1 parent 843a340 commit 6385fba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ Browser.prototype.init = async (phantomasOptions) => {
request._initiator = data.initiator;

networkDebug(
"Network.requestWillBeSent > %s %s [%s]",
"Network.requestWillBeSent > %s %s [%s] headers: %j",
request.method,
request.url,
request._initiator.type
request._initiator.type,
request.headers
);

this.events.emit("request", request); // @desc Emitted when page is about to send HTTP request
Expand Down

0 comments on commit 6385fba

Please sign in to comment.