-
1. Re: Errai and RestClientInterceptor
csa Feb 4, 2014 2:07 AM (in response to yagerhard)Hi Mark,
Using either 2.4.4-SNAPSHOT or 3.0-SNAPSHOT you should be able to pass a ResponseCallback to your context.proceed call even if your actual remote callback is a standard RemoteCallback. The ResponseCallback provides access to the Response object and its headers.
@Override public void aroundInvoke(final RestCallContext context) { context.proceed(new ResponseCallback() { @Override public void callback(Response response) { // access headers using response.getHeaders().. context.setResult(...); } }); }
Don't forget to set the result using context.setResult.
Cheers,
Christian
-
2. Re: Re: Errai and RestClientInterceptor
yagerhard Feb 15, 2014 2:23 AM (in response to csa)Hi Christian,
Sounds like that's exactly what I need.
I'd like to move up to either of the two snapshots that you've provided, but I always seem to have a lot of difficulty amending my pom.xml to make the jump to the new version. There always seems to be something that doesn't work and prevents me from continuing.
Here's my existing pom (attached) - what should I change to move to either 2.4.4 snapshot or 3.0-snapshot?
Many thanks,
MarkB
-
pom.xml 20.4 KB
-