@@ -19,20 +19,20 @@ #include #import "OFHTTPRequestFailedException.h" #import "OFString.h" #import "OFHTTPRequest.h" -#import "OFHTTPRequestReply.h" +#import "OFHTTPResponse.h" #import "common.h" @implementation OFHTTPRequestFailedException + (instancetype)exceptionWithRequest: (OFHTTPRequest*)request - reply: (OFHTTPRequestReply*)reply + response: (OFHTTPResponse*)response { return [[[self alloc] initWithRequest: request - reply: reply] autorelease]; + response: response] autorelease]; } - init { @try { @@ -44,24 +44,24 @@ abort(); } - initWithRequest: (OFHTTPRequest*)request - reply: (OFHTTPRequestReply*)reply + response: (OFHTTPResponse*)response { self = [super init]; _request = [request retain]; - _reply = [reply retain]; + _response = [response retain]; return self; } - (void)dealloc { [_request release]; - [_reply release]; + [_response release]; [super dealloc]; } - (OFString*)description @@ -80,18 +80,18 @@ break; } return [OFString stringWithFormat: @"A HTTP %s request with URL %@ failed with code %d!", type, - [_request URL], [_reply statusCode]]; + [_request URL], [_response statusCode]]; } - (OFHTTPRequest*)request { OF_GETTER(_request, false) } -- (OFHTTPRequestReply*)reply +- (OFHTTPResponse*)response { - OF_GETTER(_reply, false) + OF_GETTER(_response, false) } @end