Skip to content
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

Fixed Response::getIsOk() to include entire 2xx range #240

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

rhertogh
Copy link
Contributor

Fixed \yii\httpclient\Response::getIsOk() to include entire 2xx response code range.

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues -

@what-the-diff
Copy link

what-the-diff bot commented Jul 12, 2023

PR Summary

  • Expanded Success Range in Response Check
    The getIsOk() method in Response.php is now modified to accept a wider range of successful responses. Instead of confirming only code '20' as valid, it now recognizes all status codes from 200 to 299 as acceptable. This provides greater flexibility in treating various success responses as valid.

  • Enhanced Testing Scope
    In ResponseTest.php, the testing method dataProviderIsOk() has been expanded to include more status codes in its test cases. It now embeds status codes 100 and 226, which contributes to more comprehensive testing and ensures the operational readiness of our code from all angles.

…etIsOk()` to include entire 2xx response code range)
@rhertogh rhertogh marked this pull request as ready for review July 12, 2023 18:22
@rhertogh rhertogh requested a review from samdark July 12, 2023 18:22
@samdark samdark added this to the 2.0.16 milestone Jul 13, 2023
@samdark samdark merged commit eaddd70 into yiisoft:master Jul 13, 2023
8 of 9 checks passed
@samdark
Copy link
Member

samdark commented Jul 13, 2023

👍

rhertogh added a commit to rhertogh/yii2-httpclient that referenced this pull request Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants