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

Provide new API to programmatically create REST Client reactive #32856

Closed
Sgitario opened this issue Apr 24, 2023 · 9 comments · Fixed by #32857
Closed

Provide new API to programmatically create REST Client reactive #32856

Sgitario opened this issue Apr 24, 2023 · 9 comments · Fixed by #32857
Labels
Milestone

Comments

@Sgitario
Copy link
Contributor

Sgitario commented Apr 24, 2023

Description

When creating a REST Client reactive programmatically, we use the Microprofile API RestClientBuilder as:

var myClient = RestClientBuilder.newBuilder().baseUri(URI.create(uri)).build(Client.class);

However, having to use the Microprofile API limits the ability of Quarkus to programmatically configure some features, so this issue is about providing our Quarkus-specific RestClientBuilder API.

At the moment, the additional options would include:

In next iterations, we could extend the API with:

Implementation ideas

No response

@Sgitario Sgitario added the kind/enhancement New feature or request label Apr 24, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 24, 2023

/cc @cescoffier (rest-client), @geoand (rest-client)

Sgitario added a commit to Sgitario/quarkus that referenced this issue Apr 24, 2023
The new API includes these additional options:

- verifyHost
- trustStore by truststore and password (it was requested in quarkusio#31891)
- proxyUser
- proxyPassword
- nonProxyHosts

Fix quarkusio#32856
@geoand
Copy link
Contributor

geoand commented Apr 24, 2023

I'm +1 for this.

@radcortez do you think this should be Quarkus specific or something we can have in Smallrye?

@radcortez
Copy link
Member

SmallRye doesn't provide the REST Client implementation (it used to, but it was moved to RESTEasy).

My recommendation is to do it in RESTEasy.

@geoand
Copy link
Contributor

geoand commented Apr 24, 2023

That wouldn't allow us however to share it for RESTEasy Reactive and RESTEasy Classic.

It would definitely be easier at this point to have this be Quarkus specific and only have it apply to RESTEasy Reactive

@Sgitario
Copy link
Contributor Author

That wouldn't allow us however to share it for RESTEasy Reactive and RESTEasy Classic.

It would definitely be easier at this point to have this be Quarkus specific and only have it apply to RESTEasy Reactive

Note that we will keep supporting the existing Microprofile API. The idea is to provide a new Quarkus-specific API to extend the options to configure the REST Client Reactive.

@radcortez
Copy link
Member

And do we want to exclude RESTEasy Classic?

@Sgitario
Copy link
Contributor Author

And do we want to exclude RESTEasy Classic?

We could provide another API for RESTEasy Classic, with the supported options for only RESTEasy Classic, but I would keep our efforts to improve the user experience on RESTEasy Reactive for now.

@geoand
Copy link
Contributor

geoand commented Apr 24, 2023

but I would keep our efforts to improve the user experience on RESTEasy Reactive for now

+1

@usr000
Copy link

usr000 commented Apr 24, 2023

Also very interested in the functionality.
Some additional ideas for features:

  1. Ability to reuse Quarkus out of the box instrumentation - e.g for tracing/context propagation
  2. Ability for multiple clients to share the underlying resources - e.g. set max connection pool, and then when creating a client - supply this same connection pool.

Sgitario added a commit to Sgitario/quarkus that referenced this issue Apr 25, 2023
The new API includes these additional options:

- verifyHost
- trustStore by truststore and password (it was requested in quarkusio#31891)
- proxyUser
- proxyPassword
- nonProxyHosts

Fix quarkusio#32856
Sgitario added a commit to Sgitario/quarkus that referenced this issue Apr 25, 2023
The new API includes these additional options:

- verifyHost
- trustStore by truststore and password (it was requested in quarkusio#31891)
- proxyUser
- proxyPassword
- nonProxyHosts

Fix quarkusio#32856
@quarkus-bot quarkus-bot bot added this to the 3.1 - main milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants