diff options
-rw-r--r-- | Foundation/GTMURLBuilder.h | 3 | ||||
-rw-r--r-- | Foundation/GTMURLBuilder.m | 5 | ||||
-rw-r--r-- | Foundation/GTMURLBuilderTest.m | 11 |
3 files changed, 0 insertions, 19 deletions
diff --git a/Foundation/GTMURLBuilder.h b/Foundation/GTMURLBuilder.h index e959fa7..5615b44 100644 --- a/Foundation/GTMURLBuilder.h +++ b/Foundation/GTMURLBuilder.h @@ -37,9 +37,6 @@ @property(nonatomic, readonly) NSString *baseURLString; -// Encodes URL by percent-encoding, except reserved characters: -// ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," -+ (NSURL *)URLWithString:(NSString *)URLString; // |URLString| is expected to be a valid URL with already escaped parameter // values. + (GTMURLBuilder *)builderWithString:(NSString *)URLString; diff --git a/Foundation/GTMURLBuilder.m b/Foundation/GTMURLBuilder.m index 0cfce45..0956755 100644 --- a/Foundation/GTMURLBuilder.m +++ b/Foundation/GTMURLBuilder.m @@ -130,9 +130,4 @@ return YES; } -+ (NSURL *)URLWithString:(NSString *)URLString { - return [NSURL URLWithString: - [URLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; -} - @end diff --git a/Foundation/GTMURLBuilderTest.m b/Foundation/GTMURLBuilderTest.m index 096c09b..f6eb829 100644 --- a/Foundation/GTMURLBuilderTest.m +++ b/Foundation/GTMURLBuilderTest.m @@ -62,17 +62,6 @@ STAssertFalse([URLBuilderA isEqual:URLBuilderB], nil); } -- (void)testURLWithString { - STAssertEqualStrings(@";/?:@&=+$,", - [[GTMURLBuilder URLWithString:@";/?:@&=+$,"] - absoluteString], - nil); - STAssertEqualStrings(@"a%20b%20&%20c%20-%20URL=http://test.com/", - [[GTMURLBuilder URLWithString: - @"a b & c - URL=http://test.com/"] absoluteString], - nil); -} - - (void)testSetParameters { GTMURLBuilder *URLBuilderA = [GTMURLBuilder builderWithString:@"http://google.com/"]; |