PageRenderTime 18ms CodeModel.GetById 15ms 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
Possible License(s): Apache-2.0, BSD-3-Clause, GPL-2.0
  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. #import <Foundation/Foundation.h>
  19. /// Utility for building a URL or POST argument string.
  20. @interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions)
  21. /// Returns a dictionary of the decoded key-value pairs in a http arguments
  22. /// string of the form key1=value1&key2=value2&...&keyN=valueN.
  23. /// Keys and values will be unescaped automatically.
  24. /// Only the first value for a repeated key is returned.
  25. + (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString;
  26. /// Gets a string representation of the dictionary in the form
  27. /// key1=value1&key2=value2&...&keyN=valueN, suitable for use as either
  28. /// URL arguments (after a '?') or POST body. Keys and values will be escaped
  29. /// automatically, so should be unescaped in the dictionary.
  30. - (NSString *)gtm_httpArgumentsString;
  31. @end