Armeria: Provide a way to configure content previewing to the specific service

Created on 26 Feb 2019  路  5Comments  路  Source: line/armeria

Currently, a user can configure content previewing to the whole server using ServerBuilder. A user might want to enable content previewing to only the HTTP services when he or she has Thrift and HTTP services together.

new feature

Most helpful comment

Let me solve this issue !

All 5 comments

Let me solve this issue !

I think we will need to add a way to configure a service fluently, which is never implemented yet, like..

ServerBuilder sb = new ServerBuilder();
sb.route().get("/greet/{name}")
          .contentPreview(..)
          .verboseResponses(true)
          .defaultResponseTimeout(...)
          .service(myService) // Terminates service construction
  .route()...

Just an idea that needs a lot more polishing though :-)

I think we will need to add a way to configure a service fluently, which is never implemented yet, like..

ServerBuilder sb = new ServerBuilder();
sb.route().get("/greet/{name}")
          .contentPreview(..)
          .verboseResponses(true)
          .defaultResponseTimeout(...)
          .service(myService) // Terminates service construction
  .route()...

Just an idea that needs a lot more polishing though :-)

that sounds a great idea. How about making a new issue and resolving them separately?

Sure. This issue will be dependent on the new issue, then, right?

Created #1649.

Was this page helpful?
0 / 5 - 0 ratings