Skip to content

Commit

Permalink
add requestHeaders and requestPostData
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasbluecrew committed Feb 1, 2024
1 parent 908fe74 commit 35c34e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const VERSION = '1.0'; // This will determine breaking changes on the record format.
const VERSION = '1.1'; // This will determine breaking changes on the record format.
const puppeteer = require('puppeteer');
const { PuppeteerScreenRecorder } = require('puppeteer-screen-recorder');
const fs = require('fs');
Expand Down Expand Up @@ -36,8 +36,10 @@ const url = process.argv[2];
const requestUrl = response.url();
const responseHeaders = response.headers();
const responseStatus = response.status();
const requestHeaders = response.request().headers;
const requestMethod = response.request().method();
const requestType = response.request().resourceType();
const requestPostData = response.request().postData();
let responseJson;
try {
responseJson = await response.json();
Expand All @@ -53,6 +55,8 @@ const url = process.argv[2];
responseStatus,
requestMethod,
requestType,
requestHeaders,
requestPostData,
responseJson,
});
});
Expand Down

0 comments on commit 35c34e6

Please sign in to comment.