Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side power API #191

Closed
raboof opened this issue May 2, 2018 · 0 comments
Closed

Client-side power API #191

raboof opened this issue May 2, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@raboof
Copy link
Member

raboof commented May 2, 2018

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 ;) )

@raboof raboof added the client label May 2, 2018
@johanandren johanandren self-assigned this May 7, 2018
johanandren added a commit that referenced this issue May 31, 2018
@patriknw patriknw added this to the 0.2 milestone Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants