diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-07-25 12:00:21 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-07-25 12:00:21 +0000 |
commit | e1310c779697e905cbf464ec4ec7469aa68832af (patch) | |
tree | 6e70870012b9673e6a065a3c6e3f88235dd59894 /Foundation | |
parent | 7dc2640a750b547a3513d35715c0c59efb58c15a (diff) |
[Author: horia]
removing inconsistent and confusing URLWithString method
R=dmaclach
APPROVED=dmaclach
DELTA=26 (0 added, 21 deleted, 5 changed)
Diffstat (limited to 'Foundation')
-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/"]; |