Skip to content

Commit 7c6507c

Browse files
committed
Update the mutable URL request when switching out the URL or resourcePath
1 parent 406c5a1 commit 7c6507c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Code/Network/RKRequest.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,13 @@ - (NSString*)resourcePath {
521521
return resourcePath;
522522
}
523523

524+
- (void)setURL:(NSURL *)URL {
525+
[URL retain];
526+
[_URL release];
527+
_URL = URL;
528+
_URLRequest.URL = URL;
529+
}
530+
524531
- (void)setResourcePath:(NSString *)resourcePath {
525532
if ([self.URL isKindOfClass:[RKURL class]]) {
526533
self.URL = [RKURL URLWithBaseURLString:[(RKURL*)self.URL baseURLString] resourcePath:resourcePath];

0 commit comments

Comments
 (0)