-
Notifications
You must be signed in to change notification settings - Fork 54
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
Response extends body #92
Conversation
@sodabrew Would this work for your use case? |
I'll test this tomorrow and let you know! |
Close! I made this edit locally, as
|
} | ||
|
||
json() { | ||
this.resolve('json', body => JSON.parse(body._text)); | ||
return this.resolve('json', body => JSON.parse(body._text)); |
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.
I see that _text
wasn't changed in this PR, but I couldn't find where it was defined previously?
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.
Yeah that was an existing bug! Surprised it's never come up. Fixed.
@sodabrew This is published and available on npm as |
🥇 thank you! |
Making Response extend Body and using its resolver methods. The only backwards incompatible change is throwing for unsupported response types.