diff options
author | Tollef Fog Heen <tfheen@err.no> | 2015-10-26 21:57:59 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2015-10-26 21:57:59 +0100 |
commit | 7c470c47a4b2ea7f49836174d65dd87e15024fd1 (patch) | |
tree | e7344d30c1dfd120afccdbd87736f551137246a0 /wee_slack.py | |
parent | 929e42b882369a34b1453258a640762efc77208c (diff) | |
download | wee-slack-7c470c47a4b2ea7f49836174d65dd87e15024fd1.tar.gz |
Simplify URL string construction
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 0eb8eff..71a9268 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1711,9 +1711,9 @@ def complete_next_cb(data, buffer, command): def async_slack_api_request(domain, token, request, post_data, priority=False): if not STOP_TALKING_TO_SLACK: post_data["token"] = token - url = 'https://{}/api/{}'.format(domain, request) + url = 'url:https://{}/api/{}?{}'.format(domain, request, urllib.urlencode(post_data)) context = pickle.dumps({"request": request, "token": token, "post_data": post_data}) - w.hook_process("url:{}?{}".format(url, urllib.urlencode(post_data)), 20000, "url_processor_cb", context) + w.hook_process(url, 20000, "url_processor_cb", context) # funny, right? big_data = {} |