JavaScript Javascript - Reading binary data when using chrome.devtools.network.onRequestFinished javascript reading binary files,javascript reading binary data,js reading

So I am building a Chrome DevTools extension that inspects binary traffic on particular website.

Requests on site are made with responseType = "blob".

Now when I get request with chrome.devtools.network.onRequestFinished and then access its content with request.getContent(), I get string as response and not blob.

This string looks like some kind of binary string but not sure how it is encoded. I tried transforming it to base64 string with a lot of different transforms (Utf-8 to latin, Utf-16 to latin, ... ) but nothing gave correct result.

Any idea how to get correct result?

Update:

This is comparison of results (as Uint8Array) from client and extension.

Client:
[170, 69, 224, 171, 51, 233, 216, 82, 197, 35, 170, 213, 145, 197, 218, 82, 72, 85, 33, 77, 81, 88, 93, 16, 97, 234, 253, 208, 203, 221, 44, 44]

Extension:
[65533, 69, 65533, 65533, 51, 65533, 65533, 82, 65533, 35, 65533, 81, 65533, 65533, 82, 72, 85, 33, 77, 81, 88, 93, 16, 97, 65533, 65533, 65533, 65533, 65533, 44, 44]

Notice how every byte that is over 128 is converted to 65533 byte (Replacement character) in extension?

Now how can I access pure binary data?

Answer:1

The solution to this problem might be very trivial but its got me banging my head on walls! Bootstrap's js files are not loading on my web page for some reason. I simplified the page to the bare ...

The solution to this problem might be very trivial but its got me banging my head on walls! Bootstrap's js files are not loading on my web page for some reason. I simplified the page to the bare ...

  1. bootstrap loading bar
  2. bootstrap loading mask
  3. bootstrap loading placeholder
  4. bootstrap loading buttons
  5. bootstrap loading spinner modal
  6. bootstrap loading overlay example
  7. bootstrap loading spinner on button click
  8. bootstrap loading button on click
  9. bootstrap loading spinner overlay example
  10. bootstrap loading spinner modal example
  11. bootstrap loading dots
  12. bootstrap loading progress bar
  13. bootstrap loading spinner not showing
  14. bootstrap loading bar circle
  15. bootstrap loading component
  16. bootstrap loading spinner css
  17. bootstrap loading spinner in center
  18. bootstrap loading example
  19. bootstrap loading spinner react
  20. bootstrap loading full screen

I'm working on a responsive menu for a quite complex website. The horizontal menu collapses to a vertical one for smaller screens and I've used javascript to toggle the sub-menu items open/closed when ...

I'm working on a responsive menu for a quite complex website. The horizontal menu collapses to a vertical one for smaller screens and I've used javascript to toggle the sub-menu items open/closed when ...

  1. javascript toggle menu button
  2. javascript toggle menu script
  3. javascript toggle menu
  4. javascript toggle menu example
  5. javascript toggle menu mobile
  6. javascript toggle menu code
  7. javascript toggle menu stack overflow
  8. toggle menu javascript
  9. javascript toggle dropdown menu
  10. vanilla javascript toggle menu
  11. javascript for toggle menu bar
  12. pure javascript toggle menu
  13. javascript multiple toggle menu
  14. javascript toggle responsive menu
  15. javascript dropdown menu toggle on click
  16. javascript hamburger menu toggle
  17. javascript side menu toggle
  18. bootstrap javascript menu toggle

How to open the modal after a ajax call on success i need to trigger the modal window automatically <a class="main_blue_button" href="#complete_application_modal" id="applicationBtn">SIGN UP<...

How to open the modal after a ajax call on success i need to trigger the modal window automatically <a class="main_blue_button" href="#complete_application_modal" id="applicationBtn">SIGN UP<...

I am facing issue while making a dynamic table with dynamic rowspan. My json is a array of objects. And the element objects are also arrays. The element arrays should come as the no of dynamic rowspan....

I am facing issue while making a dynamic table with dynamic rowspan. My json is a array of objects. And the element objects are also arrays. The element arrays should come as the no of dynamic rowspan....

  1. angularjs repeat start end
  2. angularjs repeat start
  3. angularjs ng-repeat-start
  4. angularjs ng-repeat start from index
  5. angularjs ng-repeat start end
  6. angularjs ng-repeat-start example
  7. angularjs ng-repeat-start filter
  8. angularjs ng-repeat-start nested
  9. angularjs ng-repeat-start table
  10. angularjs data-ng-repeat-start