You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple REST Client classes uses the same value for configKey in their @RegisterRestClient annotation, headers specified in application.properties (using the quarkus.rest-client."client".headers."header-name" format) are no longer sent for all of the clients.
Expected behavior
Headers specified in the configuration of a specific REST client, e.g.:
Running the application (./mvnw quarkus:dev) with Quarkus 3.15.2 or 3.16.4 produces log lines such as:
DEBUG [org.jbo.res.rea.cli.log.DefaultClientLogger] Request: GET https://stage.code.quarkus.io/api/extensions?id=quarkus-rest-client Headers[My-Header=Test Header User-Agent=Test User Agent], Empty body
DEBUG [org.jbo.res.rea.cli.log.DefaultClientLogger] Request: GET https://stage.code.quarkus.io/api/streams Headers[My-Header=Test Header User-Agent=Test User Agent], Empty body
whereas with Quarkus 3.17.0 and newer, it looks like this:
DEBUG [org.jbo.res.rea.cli.log.DefaultClientLogger] Request: GET https://stage.code.quarkus.io/api/extensions?id=quarkus-rest-client Headers[My-Header=Test Header User-Agent=Test User Agent], Empty body
DEBUG [org.jbo.res.rea.cli.log.DefaultClientLogger] Request: GET https://stage.code.quarkus.io/api/streams Headers[User-Agent=Test User Agent], Empty body
Note that the second request no longer contains the "My-Header" header.
Output of uname -a or ver
No response
Output of java -version
No response
Quarkus version or git rev
3.17.0
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When multiple REST Client classes uses the same value for
configKey
in their@RegisterRestClient
annotation, headers specified inapplication.properties
(using thequarkus.rest-client."client".headers."header-name"
format) are no longer sent for all of the clients.Expected behavior
Headers specified in the configuration of a specific REST client, e.g.:
should be sent on requests from all classes annotated with
@RegisterRestClient(configKey = "testClient")
Actual behavior
Since Quarkus 3.17.0, the headers are only sent for one of the REST client classes.
It works as expected in both Quarkus 3.15.2 and 3.16.4.
How to Reproduce?
Reproducer: https://github.com/jburkal/quarkus-rest-header-test
Running the application (
./mvnw quarkus:dev
) with Quarkus 3.15.2 or 3.16.4 produces log lines such as:whereas with Quarkus 3.17.0 and newer, it looks like this:
Note that the second request no longer contains the "My-Header" header.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.17.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: