mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Added support for connection:didReceiveResponse: to be forwarded from RKResponse through RKRequestDelegate
This commit is contained in:
committed by
Blake Watters
parent
7235499d15
commit
46f668d7e9
@@ -802,6 +802,14 @@ typedef void(^RKRequestDidFailLoadWithErrorBlock)(NSError *error);
|
||||
*/
|
||||
- (void)requestWillPrepareForSend:(RKRequest *)request;
|
||||
|
||||
/**
|
||||
Sent when a request has received a response from the remote host.
|
||||
|
||||
@param request The RKRequest object that received a response.
|
||||
@param response The RKResponse object for the HTTP response that was received.
|
||||
*/
|
||||
- (void)request:(RKRequest *)request didReceiveResponse:(RKResponse *)response;
|
||||
|
||||
/**
|
||||
Sent when a request has started loading
|
||||
|
||||
|
||||
@@ -196,6 +196,9 @@ return __VA_ARGS__;
|
||||
RKLogDebug(@"Headers: %@", [response allHeaderFields]);
|
||||
_httpURLResponse = [response retain];
|
||||
[_request invalidateTimeoutTimer];
|
||||
if ([[_request delegate] respondsToSelector:@selector(request:didReceiveResponse:)]) {
|
||||
[[_request delegate] request:_request didReceiveResponse:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
|
||||
|
||||
Reference in New Issue
Block a user