Let set NSDictionary as headers, and init the property (not nil)
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index a4a0ddb..92084d9 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 {