middleware option in onEndpoint callback in makeClient. Could I create wrapper around endpointFn (here) which would use info in the middleware param to decide if relevant header should be injected? I'd get the token fro the header accessing an optional service (say AuthToken).