aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-08-12 17:36:14 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-08-12 20:34:23 -0700
commit4e45a6f82245770059562acbac822be8e484cc9d (patch)
tree018bc20e2fcb0b37c79d8768b26761b9bff54569 /src/objective-c/GRPCClient
parent6512d26b1b9bb70724437cb103f1df4b8ef5020c (diff)
Rename responseMetadata -> allResponseMetadata
Diffstat (limited to 'src/objective-c/GRPCClient')
-rw-r--r--src/objective-c/GRPCClient/GRPCCall+OAuth2.m2
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.h2
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m14
3 files changed, 9 insertions, 9 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCall+OAuth2.m b/src/objective-c/GRPCClient/GRPCCall+OAuth2.m
index 8e64b8b6ae..7f4fbacbe3 100644
--- a/src/objective-c/GRPCClient/GRPCCall+OAuth2.m
+++ b/src/objective-c/GRPCClient/GRPCCall+OAuth2.m
@@ -57,7 +57,7 @@ static NSString * const kChallengeHeader = @"www-authenticate";
}
- (NSString *)oauth2ChallengeHeader {
- return self.responseMetadata[kChallengeHeader];
+ return self.allResponseMetadata[kChallengeHeader];
}
@end
diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h
index 97324cba15..b82febb587 100644
--- a/src/objective-c/GRPCClient/GRPCCall.h
+++ b/src/objective-c/GRPCClient/GRPCCall.h
@@ -78,7 +78,7 @@ extern id const kGRPCStatusMetadataKey;
// The first time this object calls |writeValue| on the writeable passed to |startWithWriteable|,
// the |responseMetadata| dictionary already contains the response headers. When it calls
// |writesFinishedWithError|, the dictionary contains both the response headers and trailers.
-@property(atomic, readonly) NSDictionary *responseMetadata;
+@property(atomic, readonly) NSDictionary *allResponseMetadata;
// The request writer has to write NSData objects into the provided Writeable. The server will
// receive each of those separately and in order.
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index 1065ae735f..9714b67a4c 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -90,7 +90,7 @@ NSString * const kGRPCStatusMetadataKey = @"io.grpc.StatusMetadataKey";
GRPCCall *_retainSelf;
NSMutableDictionary *_requestHeaders;
- NSMutableDictionary *_responseMetadata;
+ NSMutableDictionary *_allResponseMetadata;
}
@synthesize state = _state;
@@ -122,7 +122,7 @@ NSString * const kGRPCStatusMetadataKey = @"io.grpc.StatusMetadataKey";
_requestWriter = requestWriter;
_requestHeaders = [NSMutableDictionary dictionary];
- _responseMetadata = [NSMutableDictionary dictionary];
+ _allResponseMetadata = [NSMutableDictionary dictionary];
}
return self;
}
@@ -137,8 +137,8 @@ NSString * const kGRPCStatusMetadataKey = @"io.grpc.StatusMetadataKey";
_requestHeaders = [NSMutableDictionary dictionaryWithDictionary:requestHeaders];
}
-- (NSDictionary *)responseMetadata {
- return _responseMetadata;
+- (NSDictionary *)allResponseMetadata {
+ return _allResponseMetadata;
}
#pragma mark Finish
@@ -322,18 +322,18 @@ NSString * const kGRPCStatusMetadataKey = @"io.grpc.StatusMetadataKey";
// Response headers received.
GRPCCall *strongSelf = weakSelf;
if (strongSelf) {
- [strongSelf->_responseMetadata addEntriesFromDictionary:headers];
+ [strongSelf->_allResponseMetadata addEntriesFromDictionary:headers];
[strongSelf startNextRead];
}
} completionHandler:^(NSError *error, NSDictionary *trailers) {
GRPCCall *strongSelf = weakSelf;
if (strongSelf) {
- [strongSelf->_responseMetadata addEntriesFromDictionary:trailers];
+ [strongSelf->_allResponseMetadata addEntriesFromDictionary:trailers];
if (error) {
NSMutableDictionary *userInfo =
[NSMutableDictionary dictionaryWithDictionary:error.userInfo];
- userInfo[kGRPCStatusMetadataKey] = strongSelf->_responseMetadata;
+ userInfo[kGRPCStatusMetadataKey] = strongSelf->_allResponseMetadata;
error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo];
}
[strongSelf finishWithError:error];