diff options
author | 2015-06-12 19:46:27 -0700 | |
---|---|---|
committer | 2015-06-13 01:30:35 -0700 | |
commit | 544963e18a9a498fc668153c9deb63d2d22c21a2 (patch) | |
tree | 89b8312c9e7781dd9de8c79de1d7fe98d81223b9 /src/objective-c/GRPCClient/GRPCCall.m | |
parent | d7981253de93fcfd3666a3e3bd1714b2f66a448b (diff) |
Let set NSDictionary as headers, and init the property (not nil)
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCall.m')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index a4a0ddb324..92084d9d4f 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -82,6 +82,8 @@ // correct ordering. GRPCDelegateWrapper *_responseWriteable; id<GRXWriter> _requestWriter; + + NSMutableDictionary *_requestMetadata; } @synthesize state = _state; @@ -116,10 +118,22 @@ _callQueue = dispatch_queue_create("org.grpc.call", NULL); _requestWriter = requestWriter; + + _requestMetadata = [NSMutableDictionary dictionary]; } return self; } +#pragma mark Metadata + +- (NSMutableDictionary *)requestMetadata { + return _requestMetadata; +} + +- (void)setRequestMetadata:(NSDictionary *)requestMetadata { + _requestMetadata = [NSMutableDictionary dictionaryWithDictionary:requestMetadata]; +} + #pragma mark Finish - (void)finishWithError:(NSError *)errorOrNil { |