Simplified internal checks for requests and responses

This commit is contained in:
Pierre-Olivier Latour
2014-04-08 23:00:21 -07:00
parent 289059c875
commit c454dc4e8e
6 changed files with 7 additions and 20 deletions
-3
View File
@@ -49,7 +49,6 @@
}
- (BOOL)open:(NSError**)error {
DCHECK(_data == nil);
if (self.contentLength != NSNotFound) {
_data = [[NSMutableData alloc] initWithCapacity:self.contentLength];
} else {
@@ -63,13 +62,11 @@
}
- (BOOL)writeData:(NSData*)data error:(NSError**)error {
DCHECK(_data != nil);
[_data appendData:data];
return YES;
}
- (BOOL)close:(NSError**)error {
DCHECK(_data != nil);
return YES;
}