More requestMetadata -> requestHeaders renaming

pull/2914/head
Jorge Canizales 10 years ago
parent 4e45a6f822
commit 2a24654024
  1. 8
      src/objective-c/GRPCClient/GRPCCall.h
  2. 5
      src/objective-c/GRPCClient/GRPCCall.m

@ -57,12 +57,12 @@ extern id const kGRPCStatusMetadataKey;
// These HTTP headers will be passed to the server as part of this call. Each HTTP header is a
// name-value pair with string names and either string or binary values.
//
// The passed dictionary has to use NSString keys, corresponding to the header names. The
// value associated to each can be a NSString object or a NSData object. E.g.:
// The passed dictionary has to use NSString keys, corresponding to the header names. The value
// associated to each can be a NSString object or a NSData object. E.g.:
//
// call.requestMetadata = @{@"Authorization": @"Bearer ..."};
// call.requestHeaders = @{@"authorization": @"Bearer ..."};
//
// call.requestMetadata[@"SomeBinaryHeader"] = someData;
// call.requestHeaders[@"my-header-bin"] = someData;
//
// After the call is started, modifying this won't have any effect.
//

@ -232,11 +232,10 @@ NSString * const kGRPCStatusMetadataKey = @"io.grpc.StatusMetadataKey";
#pragma mark Send headers
// TODO(jcanizales): Rename to commitHeaders.
- (void)sendHeaders:(NSDictionary *)metadata {
- (void)sendHeaders:(NSDictionary *)headers {
// TODO(jcanizales): Add error handlers for async failures
[_wrappedCall startBatchWithOperations:@[[[GRPCOpSendMetadata alloc]
initWithMetadata:metadata ?: @{} handler:nil]]];
initWithMetadata:headers ?: @{} handler:nil]]];
}
#pragma mark GRXWriteable implementation

Loading…
Cancel
Save