diff --git a/integration/before-after-request-streaming/example.ts b/integration/before-after-request-streaming/example.ts index 2d17232aa..d84fd6abf 100644 --- a/integration/before-after-request-streaming/example.ts +++ b/integration/before-after-request-streaming/example.ts @@ -791,10 +791,11 @@ export class DashStateClientImpl implements DashState { ChangeUserSettingsStream(request: Observable): Observable { const data = request.pipe(map((request) => { - DashUserSettingsState.encode(request).finish(); + const encodedRequest = DashUserSettingsState.encode(request).finish(); if (this.rpc.beforeRequest) { - this.rpc.beforeRequest(this.service, "ChangeUserSettingsStream", request); + this.rpc.beforeRequest(this.service, "ChangeUserSettingsStream", encodedRequest); } + return encodedRequest; })); const result = this.rpc.bidirectionalStreamingRequest(this.service, "ChangeUserSettingsStream", data); return result.pipe(map((data) => {