From 7c470c47a4b2ea7f49836174d65dd87e15024fd1 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 26 Oct 2015 21:57:59 +0100 Subject: Simplify URL string construction --- wee_slack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wee_slack.py') 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 = {} -- cgit