summaryrefslogtreecommitdiff
path: root/openid/oidutil.py
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2007-03-23 21:06:50 +0000
committerJosh Hoyt <josh@janrain.com>2007-03-23 21:06:50 +0000
commit024da205945bc12a22173bbbe4066bd66816ab07 (patch)
treea4ec2a99f7ef8a995feef4a68134f239b3935ee6 /openid/oidutil.py
parente9dca384caf8d81ee9808992f890ca579a4c2844 (diff)
downloadopenid-024da205945bc12a22173bbbe4066bd66816ab07.tar.gz
[project @ Documentation for oidutil.appendArgs]
Diffstat (limited to 'openid/oidutil.py')
-rw-r--r--openid/oidutil.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/openid/oidutil.py b/openid/oidutil.py
index c7803d8..5e55e3b 100644
--- a/openid/oidutil.py
+++ b/openid/oidutil.py
@@ -64,6 +64,24 @@ def log(message, level=0):
sys.stderr.write('\n')
def appendArgs(url, args):
+ """Append query arguments to a HTTP(s) URL. If the URL already has
+ query arguemtns, these arguments will be added, and the existing
+ arguments will be preserved. Duplicate arguments will not be
+ detected or collapsed (both will appear in the output).
+
+ @param url: The url to which the arguments will be appended
+ @type url: str
+
+ @param args: The query arguments to add to the URL. If a
+ dictionary is passed, the items will be sorted before
+ appending them to the URL. If a sequence of pairs is passed,
+ the order of the sequence will be preserved.
+ @type args: A dictionary from string to string, or a sequence of
+ pairs of strings.
+
+ @returns: The URL with the parameters added
+ @rtype: str
+ """
if hasattr(args, 'items'):
args = args.items()
args.sort()