Source/TNLResponse.m [422:473]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (instancetype)initWithCoder:(NSCoder *)coder
{
    if (self = [super init]) {
        _encodedSourceRequestHadBody = [coder decodeBoolForKey:@"hasBody"];
        _encodedSourceRequestClassName = [coder decodeObjectOfClass:[NSString class] forKey:@"sourceClass"];
        _URL = [coder decodeObjectOfClass:[NSURL class] forKey:@"URL"];
        _HTTPMethodValue = [coder decodeIntegerForKey:@"HTTPMethod"];
        _allHTTPHeaderFields = [coder decodeObjectOfClass:[NSDictionary class] forKey:@"HTTPHeaders"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)coder
{
    [coder encodeBool:_encodedSourceRequestHadBody forKey:@"hasBody"];
    [coder encodeObject:_encodedSourceRequestClassName forKey:@"sourceClass"];
    [coder encodeObject:_URL forKey:@"URL"];
    [coder encodeInteger:_HTTPMethodValue forKey:@"HTTPMethod"];
    [coder encodeObject:_allHTTPHeaderFields forKey:@"HTTPHeaders"];
}

- (nullable NSURL *)URL
{
    return _URL;
}

- (TNLHTTPMethod)HTTPMethodValue
{
    return _HTTPMethodValue;
}

- (nullable NSDictionary<NSString *, NSString *> *)allHTTPHeaderFields
{
    return _allHTTPHeaderFields;
}

- (nullable NSData *)HTTPBody
{
    if (_encodedSourceRequestHadBody) {
        /*
         In order to preserve "isEqual" comparison between the encoded request
         and the source request, we need to have a non-empty body.

         We're arbitrarily using a valid JSON payload as the body, but it could
         really be any payload.
         */
        return [@"{\"body\":true}" dataUsingEncoding:NSUTF8StringEncoding];
    }
    return nil;
}

@end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



TwitterNetworkLayerTests/TNLResponseTest.m [49:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (instancetype)initWithCoder:(NSCoder *)coder
{
    if (self = [super init]) {
        _encodedSourceRequestHadBody = [coder decodeBoolForKey:@"hasBody"];
        _encodedSourceRequestClassName = [coder decodeObjectOfClass:[NSString class] forKey:@"sourceClass"];
        _URL = [coder decodeObjectOfClass:[NSURL class] forKey:@"URL"];
        _HTTPMethodValue = [coder decodeIntegerForKey:@"HTTPMethod"];
        _allHTTPHeaderFields = [coder decodeObjectOfClass:[NSDictionary class] forKey:@"HTTPHeaders"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)coder
{
    [coder encodeBool:_encodedSourceRequestHadBody forKey:@"hasBody"];
    [coder encodeObject:_encodedSourceRequestClassName forKey:@"sourceClass"];
    [coder encodeObject:_URL forKey:@"URL"];
    [coder encodeInteger:_HTTPMethodValue forKey:@"HTTPMethod"];
    [coder encodeObject:_allHTTPHeaderFields forKey:@"HTTPHeaders"];
}

- (nullable NSURL *)URL
{
    return _URL;
}

- (TNLHTTPMethod)HTTPMethodValue
{
    return _HTTPMethodValue;
}

- (nullable NSDictionary<NSString *, NSString *> *)allHTTPHeaderFields
{
    return _allHTTPHeaderFields;
}

- (nullable NSData *)HTTPBody
{
    if (_encodedSourceRequestHadBody) {
        return [@"{\"body\":true}" dataUsingEncoding:NSUTF8StringEncoding];
    }
    return nil;
}

@end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



