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

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

问题描述

我一直在寻找一种方法来更改在浏览器中发出的XHR请求,然后再次重播。
说我在浏览器中完成了一个完整的POST请求,而我唯一想更改的是一个较小的值,然后再次播放它。直接在浏览器中执行此操作会容易得多且更快。

I've been looking for a way to alter a XHR request made in my browser and then replay it again. 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.

我已经在Google上搜索了一下,但还没有找到一种方法在Chrome或Firefox中。可以在其中一种浏览器中,也可以在另一种浏览器中使用某种方法吗?

I've google'd 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的网络面板中,右键单击并选择复制为cURL

  • 粘贴/编辑请求,然后从终端发送,假设您具有 curl 命令

  • In the Network panel of devtools, right-click and select Copy as cURL
  • Paste / Edit the request, and then send it from a terminal, assuming you have the curl command

查看捕获内容:

或者,如果您需要在网页上下文中发送请求, >,选择复制为提取 ,然后在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:

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天全站免登陆