Hi Marek,

It's about the client.
I put an implementation of HttpHeaders to the context data map, at the moment it is read-only [1, 2].

Thanks,
Michał


[1] https://github.com/smallrye/smallrye-rest-client/pull/44/commits/d8c6daf12248a4e1c5863746ad35b9c94f202483#diff-4302e637161b0d4c1d49d6ebed6d0735
[2] https://github.com/smallrye/smallrye-rest-client/pull/44/commits/d8c6daf12248a4e1c5863746ad35b9c94f202483#diff-31c2c61af4b77ac8ee35501111bea3baR99

On Tue, Feb 5, 2019 at 12:53 PM Marek Kopecky <mkopecky@redhat.com> wrote:

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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/resteasy-dev
_______________________________________________
resteasy-dev mailing list
resteasy-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/resteasy-dev