-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(microservices): Add grpc metadata to server responce
example of usage: import { Metadata } from 'grpc'; @GrpcMethod('Service', 'Method') public method(request: any, metadata: Metadata, sendMetadata: any): any { // 1. nothing to do with request that is empty in this case // 2. may something with metadata from client if needed // 3. send metadata with responce........ const srvMetadata = new Metadata(); srvMetadata.add('Set-Cookie', 'yummy_cookie=choco'); sendMetadata(srvMetadata); return 'Hello World!!!'; }
- Loading branch information
alex
committed
Jul 24, 2020
1 parent
1b43bac
commit b766c74
Showing
7 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export enum RpcParamtype { | ||
PAYLOAD = 3, | ||
CONTEXT = 6, | ||
GRPCCALL = 9, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters