-
1. Re: How works, errai jax-rs?
csa Dec 4, 2013 5:51 PM (in response to shut_desert)Hi,
There's a Getting Started chapter in our docs:
Errai JAX-RS - Errai - Project Documentation Editor
We also have a tutorial project that uses Errai JAX-RS:
https://github.com/errai/errai-tutorial
...and a Errai JAX-RS specific demo application:
errai/errai-demos/errai-jaxrs-demo-crud at master · errai/errai · GitHub
Errai's client-side interceptors are described here:
Errai JAX-RS - Errai - Project Documentation Editor
Do you have a specific problem you need help with?
Cheers,
Christian
-
2. Re: How works, errai jax-rs?
shut_desert Dec 5, 2013 4:59 AM (in response to csa)Good day! I want to create your own interceptor queries. I want to intercept any request from the client to the server and check the header. I need to get status code of the header check. Need to know what it is equal to 200 or 404, etc.
-
3. Re: Re: How works, errai jax-rs?
csa Dec 11, 2013 11:18 AM (in response to shut_desert)Here's an example of an interceptor that checks the status code of the response:
public class MyInterceptor implements RestClientInterceptor{ @Override public void aroundInvoke(final RestCallContext context) { context.proceed(new ResponseCallback() { @Override public void callback(Response response) { if (response.getStatusCode() == 200) { //... } } }); } }
To use the interceptor simply annotate a JAX-RS interfaces method (or the interface directly to intercept all methods) with @InterceptedCall(MyInterceptor.class).
Cheers,
Christian
-
4. Re: Re: How works, errai jax-rs?
shut_desert Dec 16, 2013 11:17 AM (in response to csa)Thank you very helpful!
I have another question about the test queries. Last time we realized Rest check requests. How can I check the same RPC requests? through RPCinterceptor?
You can do so, take any request and check it? To check any request, even though Rest or RPC?