Skip to content

Add support for client hooks #42

Description

@pelletiermaxime

In all my code that calls the rpc services I end up wrapping the call in a try catch and doing the same error treatment. I was looking at if it was possible to add some kind of middleware/hooks/interceptor, but that would ideally need to be available in the generated code. Looking at the Go client I see that they now have client hooks (https://godoc.org/github.com/twitchtv/twirp#ClientHooks).

The implementation would probably look a lot like the server hooks, an argument to the client creation with a class that implements the RequestPrepared, ResponseReceived and Error functions.

What do you think ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions