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

Replace getStatusLine on HttpResponse #400

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Conversation

joanvr
Copy link
Contributor

@joanvr joanvr commented Aug 1, 2023

What's changed?

HttpResponse::getStatusLine has been removed in Apache HttpClient 5.x, you can call the getStatusCode, getProtocolVersion and getReasonPhrase directly on the HttpResponse object.
When applicable, we will apply a simplify method chain, but for scenarios where the StatusLine is stored or used directly, we are going to instantiate a StatusLine object (which has the same previous 4.x methods) with the response object.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ auto-formatter on affected files

@joanvr joanvr requested review from timtebeek and rpau August 1, 2023 08:29
@timtebeek timtebeek added the recipe Recipe requested label Aug 1, 2023
Joan Viladrosa and others added 2 commits August 1, 2023 10:38
…sLine.java

Co-authored-by: Tim te Beek <tim@moderne.io>
…sLine.java

Co-authored-by: Tim te Beek <tim@moderne.io>
@joanvr joanvr merged commit 60d0e61 into main Aug 1, 2023
1 check passed
@joanvr joanvr deleted the httpclient/status-line branch August 1, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe requested
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants