diff options
Diffstat (limited to 'src/objective-c')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.h | 6 | ||||
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCall.m | 14 |
2 files changed, 2 insertions, 18 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index 210ea709a3..35f7e16af7 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -169,10 +169,8 @@ extern id const kGRPCTrailersKey; // // After the call is started, trying to modify this property is an error. // -// For convenience, the property is initialized to an empty NSMutableDictionary, and the setter -// accepts (and copies) both mutable and immutable dictionaries. -- (id<GRPCRequestHeaders>)requestHeaders; // nonatomic -- (void)setRequestHeaders:(NSDictionary *)requestHeaders; // nonatomic, copy +// The property is initialized to an empty NSMutableDictionary. +@property(atomic, readonly) id<GRPCRequestHeaders> requestHeaders; // This dictionary is populated with the HTTP headers received from the server. This happens before // any response message is received from the server. It has the same structure as the request diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 1be753e688..b6986bf59c 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -130,20 +130,6 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; return self; } -#pragma mark Metadata - -- (id<GRPCRequestHeaders>)requestHeaders { - return _requestHeaders; -} - -- (void)setRequestHeaders:(NSDictionary *)requestHeaders { - GRPCRequestHeaders *newHeaders = [[GRPCRequestHeaders alloc] initWithCall:self]; - for (id key in requestHeaders) { - newHeaders[key] = requestHeaders[key]; - } - _requestHeaders = newHeaders; -} - #pragma mark Finish - (void)finishWithError:(NSError *)errorOrNil { |