PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.h

http://macfuse.googlecode.com/
C++ Header | 36 lines | 5 code | 5 blank | 26 comment | 0 complexity | 05f161c55124c130767b1d880e6768a2 MD5 | raw file
 1//
 2//  GTMNSDictionary+URLArguments.h
 3//
 4//  Copyright 2006-2008 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9// 
10//  http://www.apache.org/licenses/LICENSE-2.0
11// 
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import <Foundation/Foundation.h>
20
21/// Utility for building a URL or POST argument string.
22@interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions)
23
24/// Returns a dictionary of the decoded key-value pairs in a http arguments
25/// string of the form key1=value1&key2=value2&...&keyN=valueN.
26/// Keys and values will be unescaped automatically.
27/// Only the first value for a repeated key is returned.
28+ (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString;
29
30/// Gets a string representation of the dictionary in the form
31/// key1=value1&key2=value2&...&keyN=valueN, suitable for use as either
32/// URL arguments (after a '?') or POST body. Keys and values will be escaped
33/// automatically, so should be unescaped in the dictionary.
34- (NSString *)gtm_httpArgumentsString;
35
36@end