How to copy Request Payload in Chrome on Mac?

…衆ロ難τιáo~ 提交于 2019-12-06 18:43:02

问题


Recently I'm not able to copy a parsed request payload from Chrome DevTools. Button is disabled. I'm able to copy normal POST and GET request but not a parsed JSON payload.

This is huge pain in the ... Anyone know the solution for it?


回答1:


Came to your question having the same problem.

My solution: Select the text with your mouse pointer and make sure you are not selecting more than the whole content, then try again.

I was selecting more than the contents by triple clicking it and it wouldn't let me copy, probably a bug in chrome.




回答2:


you can switch between view-source and view-parsed. They are clickable options.




回答3:


Similarly to what @NickBrady said:

  1. Click on the item that you would like under the network tab.
  2. Click the Response tab.
  3. Copy the response
  4. In Chrome console type copy(JSON.parse('{paste the response}')) [hit enter] NOTE: You have to wrap the response in quotes for JSON.parse() to work.
  5. The pretty formatted version of the response is now in your clipboard. Paste it where ever you need. :)


来源:https://stackoverflow.com/questions/41056657/how-to-copy-request-payload-in-chrome-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!