-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add HTTP status code to kitsu responses #1041
Conversation
f158326
to
08a5d46
Compare
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.
Thank you for this PR! Would you be able to change the variable name to statusCode for consistency and update the failing tests to have status codes expected.
This allows looking for status codes like 206 to know it's a partial response.
5f38523
to
b8d41ee
Compare
Thanks @wopian! Have updated the PR - including adding the status code to the other request types, but happy to adjust however you'd like :-) |
Thank you! These changes look great! After looking over it again I've opted to keep it the same as the property exposed by Axios ( |
Kitsu.prototype.request
.
Code Climate has analyzed commit fa19526 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (100% is the threshold). This pull request will bring the total coverage in the repository to 100.0% (0.0% change). View more on Code Climate. |
* Add status code to the result of `Kitsu.prototype.request`. This allows looking for status codes like 206 to know it's a partial response. * refactor: replace statusCode with status --------- Co-authored-by: James Harris <3440094+wopian@users.noreply.github.com>
The changes have been released as |
Thanks for Kitsu! It's awesome :-)
We wanted to know whether the HTTP status code was a 206 to know if we'd received a partial response - and were wondering if you'd be willing to land this tweak to add it to the result :-)
Also, on looking a bit closer, I noticed that this isn't in the other methods in the same file - would be willing to add it more places if that's helpful 🙂