X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

How can I intercept and modify (not resend) a request?

Được đăng

Imagine that I'm on a website like example.com and I click a button. Looking at my browser's network tab, I can see that the page has sent a POST request to example.com with some data and received some data back from the server.

I want to be able to:

  • Edit the data before it is sent to the server.
  • Edit the response data before it is handled by the function.

I'm aware of Firefox's "edit and resend" feature, but I want to tamper with the very first request before it reaches the server.

I've been searching for this for hours but all of the answers appear to be outdated due to browser updates. What is the modern approach to doing this?

Imagine that I'm on a website like example.com and I click a button. Looking at my browser's network tab, I can see that the page has sent a POST request to example.com with some data and received some data back from the server. I want to be able to: * Edit the data before it is sent to the server. * Edit the response data before it is handled by the function. I'm aware of Firefox's "edit and resend" feature, but I want to tamper with the very first request before it reaches the server. I've been searching for this for hours but all of the answers appear to be outdated due to browser updates. What is the modern approach to doing this?

Chi tiết hệ thống bổ sung

Ứng dụng

  • Chuỗi đại diện người dùng: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Thông tin chi tiết

jscher2000
  • Top 10 Contributor
8758 giải pháp 71655 câu trả lời
Được đăng

Most of the results for header are designed to create and apply rules over and over rather than hack on individual requests and responses.

This is the only one I saw that can intercept a post and let you modify it before sending:

https://addons.mozilla.org/firefox/addon/http-header-live/

I didn't try it myself.

Most of the [https://addons.mozilla.org/firefox/search/?platform=windows&q=header&type=extension results for ''header''] are designed to create and apply rules over and over rather than hack on individual requests and responses. This is the only one I saw that can intercept a post and let you modify it before sending: https://addons.mozilla.org/firefox/addon/http-header-live/ I didn't try it myself.

Người tạo câu hỏi

I'm trying it out now but I don't see any options to intercept the original request. It appears to just be yet another "Edit and resend" feature like the rest. The original request still gets sent.

I'm trying it out now but I don't see any options to intercept the original request. It appears to just be yet another "Edit and resend" feature like the rest. The original request still gets sent.