Files
RestKit/Code/Network/RKURL.m
Blake Watters c35d0bab1d Implemented substantial catalog example application covering advanced usage of RestKit:
* Cleaned up remaining warnings about if (self = [super init])
* RKParamsExample - Highlights multi-part uploads
* RKRequestQueueExample - Working with the request queue
* RKBackgroundRequestExample - Examples of using the background policies for backgrounding requests
* RKReachabilityExample - Shows how to work with the reachability observer
* RKRelationshipMappingExample - Shows how to map related objects from JSON into an object graph
* RKCoreDataExample - Shows the basics of using RestKit's Core Data examples

Also rearranged dispatch of RKRequest delegate method for didStartLoad: to ensure requeue callbacks get invoked in a timely manner. refs #62
2011-04-22 11:28:56 -04:00

38 lines
901 B
Objective-C

//
// RKURL.m
// RestKit
//
// Created by Jeff Arena on 10/18/10.
// Copyright 2010 Two Toasters. All rights reserved.
//
#import "RKURL.h"
@implementation RKURL
@synthesize baseURLString = _baseURLString;
@synthesize resourcePath = _resourcePath;
+ (RKURL*)URLWithBaseURLString:(NSString*)baseURLString resourcePath:(NSString*)resourcePath {
return [[[RKURL alloc] initWithBaseURLString:baseURLString resourcePath:resourcePath] autorelease];
}
- (id)initWithBaseURLString:(NSString*)baseURLString resourcePath:(NSString*)resourcePath {
self = [self initWithString:[NSString stringWithFormat:@"%@%@", baseURLString, resourcePath]];
if (self) {
_baseURLString = [baseURLString copy];
_resourcePath = [resourcePath copy];
}
return self;
}
- (void)dealloc {
[_baseURLString release];
_baseURLString = nil;
[_resourcePath release];
_resourcePath = nil;
[super dealloc];
}
@end