JAX RS客户端API拦截器 [英] JAX RS Client API interceptor
本文介绍了JAX RS客户端API拦截器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用JAX RS Client API时,是否可以通过拦截器向请求中添加标头,而不是通过显式设置标头来添加标头:
Is there a way to add a header into the request via interceptors,but not via explicitly setting a header, when JAX RS Client API is used:
Client client = ClientBuilder.newClient();
Response response = client.target("someUrl").path("somePath").request().get();
以AOP方式
推荐答案
查看全文