dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.89k stars 2.06k forks source link

rest服务端接收到请求后,如何区分postman发送的还是dubbo消费端发送的? #336

Open gMan1990 opened 7 years ago

gMan1990 commented 7 years ago

场景1:非dubbo的消费端调用dubbo的REST服务 场景2:dubbo消费端调用dubbo的REST服务 比如一个通过postman发送,一个通过dubbo消费端发送,在服务端如何区分

microhuang commented 6 years ago

@gMan1990 System.out.println(RpcContext.getContext().getRequest(HttpServletRequest.class).getHeader("User-Agent"));