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

[HttpClient-changes] handler the request-response in vertx4 #57

Conversation

jcarranzan
Copy link
Contributor

@jcarranzan jcarranzan commented Dec 16, 2020

Motivation:

Context
Now in vertx 4.0.0 when you do some HttpClientRequest and get the result if you want to do after some operation (compose, succeed,etc) with the result before sending it, you have to add the response method that returns the Future

This change is shown in vertx examples in the core/http/proxy/client.java :
request.response().compose

vert-x3/vertx-examples@1ddfd8c#diff-330da0139766c23d1b970aa604bae5ed935b15ce6800348c696b0a5f6744f74b

@@ -201,3 +201,36 @@ response.end(ar -> {
}
});
----
+

On the other hand, we can handle the response with some operations if we want to. You can see the difference in the next examples.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of we use "you"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcarranzan @vietj Can we rephrase this to:

You can also handle the response with operations. The following examples demonstrate handling responses with operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I've updated it.
What do you think?

Thank you

@@ -203,7 +203,8 @@ response.end(ar -> {
----
+

On the other hand, we can handle the response with some operations if we want to. You can see the difference in the next examples.
On the other hand, you can also handle the response with operations like onSuccess, compose, bodyHandler, etc.
The following examples demonstrate handling responses with the operation onSuccess :

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also handle the response with methods such as, onSucces(), compose(), and bodyHandler().
The following examples demonstrate handling responses using the onSuccess() method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to point here, that is not only those 3 methods, there are a few methods more.

@sangeetaraghu sangeetaraghu merged commit ea3302f into vert-x3:master Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants