[resteasy-dev] Injecting HttpHeaders into ClientRequestFilter (with @Context)

Marek Kopecky mkopecky at redhat.com
Tue Feb 5 06:34:39 EST 2019


Hi.

Does MP Rest Client 1.2 TCK use @Context annotation on server side or on 
client side? I don't see @RunAsClient annotation there, but filter is 
added to the deployment [1].

Injecting HttpHeaders into ClientRequestFilter works on server side, but 
doesn't work on client side in RESTEasy 3.6.2 and WF master. See also 
RESTEASY-2084 related jira [2].

Marek

[1] 
https://github.com/eclipse/microprofile-rest-client/blob/1.2/tck/src/main/java/org/eclipse/microprofile/rest/client/tck/ClientHeadersFactoryTest.java#L41
[2] https://issues.jboss.org/browse/RESTEASY-2084


On 1/25/19 11:38 PM, Michal Szynkiewicz wrote:
> Hi,
>
> The MP Rest Client 1.2 TCK assumes the ${subject} should be possible 
> but I'm getting "RESTEASY003880: Unable to find contextual data of 
> type: javax.ws.rs.core.HttpHeaders" when I try.
> I think it's possible to add an implementation of HttpHeaders to 
> ResteasyProviderFactory.getContextDataMap(), and then make the headers 
> from it populated to the request with a filter but is there a better 
> way? Maybe some add-on that would make it work out of the box? ;)
>
> Thanks,
> Michał
>
> _______________________________________________
> resteasy-dev mailing list
> resteasy-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/resteasy-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/resteasy-dev/attachments/20190205/f28e277f/attachment.html 


More information about the resteasy-dev mailing list