michaeldera / image-accessibility-extension

A Google Chrome and Microsoft Edge extension to add alt attributes to images on webpages without them
MIT License
6 stars 3 forks source link

Reading Data from Readable Stream #2

Closed michaeldera closed 4 years ago

michaeldera commented 4 years ago

Describe the bug When I call the REST endpoint that is supposed to receive the JSON payload with the content of the image, I get a Readable Stream object in the response body (response.body), I am not having the best time trying to read the stream.

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo and and set up the extension in developer mode as inidcated in the contributing guidelines
  2. Active the extension and add a debugger (debugger;) on the response from fetch;
  3. Inspection of the response.body after reloading a page with an image without alt atttributes will indicate it is a readable stream

Expected behavior Would like to either be able to read the stream or to receive the response as a JSON payload (Worth mentioning that tools such as Swagger, Insomnia, Postman receive the reponse as JSON)

Desktop (please complete the following information):

teddychief commented 4 years ago

Respect bro

michaeldera commented 4 years ago

Thank you.