Can't copy paste request body JSON from preview tab. I don't like the pretty printing.

2,600 views
Skip to first unread message

Sara Tansey

unread,
May 12, 2018, 3:48:54 AM5/12/18
to Chrome DevTools
I want to copy paste the request body json because I need example data for integration tests.

I used to be able to copy paste perfect json from the developer tools. Now It's not possible. I have to use postman which is a lot of trouble, or find a place in the code to add a console log statement. The data that appears for the request in the console has a stack trace, but not request body. 

This used to be easy. It's nice that some one at google added pretty printing to the preview, but I need a way to turn the "pretty" printing off so that I can get access to the correctly formatted json version of the data. 

What am I missing?
Screen Shot 2018-05-11 at 3.38.34 PM.png

PhistucK

unread,
May 12, 2018, 3:53:29 AM5/12/18
to Google Chrome Developer Tools
You talk about the request body, but you the screenshot discusses response bodies.

For the request body, there is a "view source" link.
image.png

​For the response body, simply click on ​"Response" (next to "Preview") in order to see the original JSON response.

Or am I misunderstanding something?

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/77633a45-7e21-444b-ae74-dd9c1f21dcd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

J

unread,
May 12, 2018, 5:48:44 AM5/12/18
to google-chrome-...@googlegroups.com
Easy, just do it a line at a time or use insoector to review the code. You can cooy it from there. Idk what editors do you have, but just go to developer tools on instagram and the code is yours to paste and copy. Get atom or something real time.

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/77633a45-7e21-444b-ae74-dd9c1f21dcd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Screen Shot 2018-05-11 at 3.38.34 PM.png>
Reply all
Reply to author
Forward
0 new messages