编辑和重播 XHR chrome/firefox 等? [英] Edit and replay XHR chrome/firefox etc?

查看:20
本文介绍了编辑和重播 XHR chrome/firefox 等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一种方法来更改在我的浏览器中发出的 XHR 请求,然后重新播放它.

I have been looking for a way to alter a XHR request made in my browser and then replay it again.

假设我在浏览器中完成了一个完整的 POST 请求,而我唯一想要更改的是一个小值,然后再次播放.直接在浏览器中执行此操作会更容易、更快捷.

Say I have a complete POST request done in my browser, and the only thing I want to change is a small value and then play it again. This would be a lot easier and faster to do directly in the browser.

我用谷歌搜索了一下,还没有找到在 Chrome 或 Firefox 中执行此操作的方法.

I have googled a bit around, and haven't found a way to do this in Chrome or Firefox.

有没有办法在这些浏览器中的任何一个或另一个浏览器中做到这一点?

Is there some way to do it in either one of those browsers, or maybe another one?

推荐答案

Chrome :

  • 在 devtools 的 Network 面板中,右键单击并选择 Copy as cURL
  • 粘贴/编辑请求,然后从终端发送它,假设您有 curl 命令

查看截图:

或者,如果您需要在网页上下文中发送请求,请选择 复制为获取" 并编辑并从 javascript 发送内容控制台面板.

Alternatively, and in case you need to send the request in the context of a webpage, select "Copy as fetch" and edit-send the content from the javascript console panel.


火狐:

Firefox 允许直接从网络面板编辑和重新发送 XHR.以下截图来自 Firefox 36:

Firefox allows to edit and resend XHR right from the Network panel. Capture below is from Firefox 36:

这篇关于编辑和重播 XHR chrome/firefox 等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆