Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Chrome Extension get POST Request Data

I am trying to get the formData of a POST request with a chrome extension. I am using the following manifest.json file and background.js file. However, when I console.log the requestBody I cannot see the formData which was sent by the website. How can I get the form elements?

manifest.json

{
  "manifest_version": 2,
  "name": "Form Data",
  "description": "Looks at some form data.",
  "version": "0.9",
  "background": {
    "scripts": ["background.js"]
  },
  "permissions": [
    "webRequest",
    "webRequestBlocking",
    "<all_urls>"
  ]
}
background.js

chrome.webRequest.onBeforeRequest.addListener(
    function(details) {
        if(details.method == "POST")
            console.log(JSON.stringify(details));
    },
    {urls: ["<all_urls>"]},
    ["requestBody"]
);

Example Response:

{"frameId":0,"initiator":"https://example.com","method":"POST","parentFrameId":-1,"requestBody":{"raw":[{"bytes":{}}]},"requestId":"13910","tabId":430,"timeStamp":1645826234368.5469,"type":"xmlhttprequest","url":"https://www.example.com/api/v4/login"}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!