83

i am trying to get file from server that has size of(15mb) through Axios Request. showing status "200", but not sending file previewData(base64) and showing this error "failed to load response data request content was evicted from inspector cache"enter image description here in the preview of Network in inspect. when i get 2 or 3 MB fille that successfully retrived.

Rahimuddin
  • 458
  • 5
  • 15
Rizwan Ali
  • 955
  • 2
  • 5
  • 7

6 Answers6

48

The solution I found for capturing big responses is to copy the request and execute it by other means, such as PowerShell or cURL. From the Chrome or Firefox DevTools you can copy the request to a PowerShell, cURL or fetch command by right-clicking the request, selecting copy and then selecting your preferred execution method.

What worked best for me is copying the request as cURL command from Firefox. Chrome is giving me invalid cURL commands.

To capture the response to a file, append > response.txt to the cURL command.

It is also possible to select cURL as the copy method and import it into Postman. In Postman select File - Import - Raw text and copy the cURL command. When I tried this it did mess up the double quotes in the JSON body of a POST request so it may need some manual tweaking.

shtrip
  • 497
  • 3
  • 6
  • 3
    This should be the accepted answer. BTW: as of Apr 2022, Chrome provides very correct `cURL` command. Just select the API call of your interest, right click and select *copy > copy as cURL*, then paste the content of your clipboard into the bash|zsh terminal and hit enter. – DelphyM Apr 20 '22 at 08:07
  • Chrome Version 100.0.4896.127 (Official Build) (64-bit) delivers flawed cURL commands. Firefox 99.0.1 (64-bit) does good job in generating the correct cURL commands. – Andrey Kazak Apr 23 '22 at 13:00
  • 1
    No it should not be the accepted answer, because OP is trying to preview the body of the request not the response. This only works for the response, and copying the request in such case will also drop the body – Tofandel Jan 30 '23 at 09:34
  • The **Postman** option worked perfectly but only with copy as cURL(bash) in chrome – SeyMi Jun 29 '23 at 09:34
19

The data exists, it's just that it doesn't show it in the cache inspector because it exceeds the maximum number of characters, you can check by saving what the variable has in a .txt file

Gabriel Nuñez
  • 307
  • 2
  • 3
  • 12
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 01 '22 at 11:37
10

The easiest way is to double click the request to load the results in a new browser window.

As others have said you can also output results to a file using your preferred method.

Joshua Brewer
  • 117
  • 1
  • 3
4

In my case, the issue resolved by closing the dev tools of Chrome and reopening it and then refreshing the page. This may not be the case for everyone, but resolved my issue and "failed to load response data request content was evicted from inspector cache" error gone.

Iman Mahmoudinasab
  • 6,861
  • 4
  • 44
  • 68
1

You can use Fiddler. It can intercept the connection between the browser and the website so you can monitor everything go between.

0

In my case, create a .txt file and save the base64 in it, I checked that the data was sent and saved. Therefore the data was not displayed in the inspector because it exceeds the maximum size.

Gabriel Nuñez
  • 307
  • 2
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 04 '22 at 18:01
  • Dear @Community bot: but sometimes it is just "street knowledge", or "if I leaked how I knew, I would get fired." – Dan Jacobson Apr 12 '23 at 05:16