HelloWorldService.Iface helloService =
Clients.builder("tbinary+http://127.0.0.1:8080/hello")
.addHttpHeader("key", "value")
.build(HelloWorldService.Iface.class);
ServerBuilder sb = Server.builder();
sb.service("/hello", THttpService.of(new HelloServiceImpl()));
sb.http(8080);
Server server = sb.build();
server.start();
如何处理服务器中的 HTTP 标头?THttpService
是最终类,所以我不能扩展它来处理标题。