Client-side power API
raboof opened this issue · comments
The current generated client has an API suitable for message streams, but does not provide access to underlying protocol details.
For some use cases, such as adding per-call authentication principal information or reading custom response headers, we should have a 'power API'. Likely we'll have a method on the 'normal' client to get an instance of the 'powerful' client, which would also have methods for each call, but those would then return an object on which further specifics can be specified before the call is issued, something like:
val myServiceClient: MyServiceClient
val s: Source[Foo] = myServiceClient.getFoos(query)
val a: AdvancedMyServiceClient = myServiceClient.advanced
val (s: Source[Foo], rh: Seq[HttpHeader]) = a.getFoos.addRequestHeader("Authentication", "Complicated").exposeResponseHeaders.execute()
(all naming and other specifics are still up for debate ;) )