From eff8351b590bcf190b175e2add2ab87c8e7204ec Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 29 Jul 2009 02:00:24 +0000 Subject: [Author: iwade] Add gtm_dictionaryWithHttpArgumentsString to NSDictionary+URLArguments. R=thomasvl APPROVED=thomasvl DELTA=73 (72 added, 0 deleted, 1 changed) --- Foundation/GTMNSDictionary+URLArguments.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Foundation/GTMNSDictionary+URLArguments.h') diff --git a/Foundation/GTMNSDictionary+URLArguments.h b/Foundation/GTMNSDictionary+URLArguments.h index 4bc896d..b094411 100644 --- a/Foundation/GTMNSDictionary+URLArguments.h +++ b/Foundation/GTMNSDictionary+URLArguments.h @@ -21,8 +21,14 @@ /// Utility for building a URL or POST argument string. @interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions) +/// Returns a dictionary of the decoded key-value pairs in a http arguments +/// string of the form key1=value1&key2=value2&...&keyN=valueN. +/// Keys and values will be unescaped automatically. +/// Only the first value for a repeated key is returned. ++ (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString; + /// Gets a string representation of the dictionary in the form -/// key1=value1&key2&value2&...&keyN=valueN, suitable for use as either +/// key1=value1&key2=value2&...&keyN=valueN, suitable for use as either /// URL arguments (after a '?') or POST body. Keys and values will be escaped /// automatically, so should be unescaped in the dictionary. - (NSString *)gtm_httpArgumentsString; -- cgit v1.2.3