-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow responding with Blob or ArrayBuffer when responseType is blob
#164
Conversation
Codecov Report
@@ Coverage Diff @@
## master #164 +/- ##
==========================================
+ Coverage 90.54% 90.80% +0.25%
==========================================
Files 13 13
Lines 603 609 +6
==========================================
+ Hits 546 553 +7
+ Misses 57 56 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@mroderick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a test for the new error you added. Looks good otherwise.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I don't understand why the added tests did not cover the lines it complains about. It seems to exactly hit those lines 🤔 |
@offirgolan I just casually looked at pending PRs and found this. Do you have any idea why codecov reports the lines as not being covered? Your tests does seem to catch the exception, so ... ? I saw this was pushed a year ago, so about time it got merged 😃 |
No clue @fatso83. I'd love to get this merged in and published though since I've seen multiple users of pollyjs running into this issue. |
Actually, @fatso83 check my comment above:
|
@fatso83 would it be possible to cut a release? |
Currently, when the responseType is
blob
the body must be a string which is then converted to autf8
ArrayBuffer which doesn't work for binary data. This allows you to respond with either an ArrayBuffer (which will get converted into a Blob) or Blob.