summaryrefslogtreecommitdiffstats
path: root/pykolab/wap_client
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-14 11:58:58 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-14 11:58:58 +0100
commit8a9e853245a10e6b6906da121d3ae1e335d5621d (patch)
tree92b08814ac29098799e9ef47266406553fe1bbd6 /pykolab/wap_client
parent63617be06a287fcba675d736eb20cbc2ec183539 (diff)
downloadpykolab-8a9e853245a10e6b6906da121d3ae1e335d5621d.tar.gz
Remove wap_client/request.py it served no purpose
Diffstat (limited to 'pykolab/wap_client')
-rw-r--r--pykolab/wap_client/request.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/pykolab/wap_client/request.py b/pykolab/wap_client/request.py
deleted file mode 100644
index 0613333..0000000
--- a/pykolab/wap_client/request.py
+++ /dev/null
@@ -1,29 +0,0 @@
-def request(method, api_uri, params=None, headers={}):
- global session_id
-
- if not session_id == None:
- headers["X-Session-Token"] = session_id
-
- conn = connect()
- conn.request(method.upper(), "%s/%s" % (API_BASE,api_uri), params, headers)
- response = conn.getresponse()
- data = response.read()
-
- print method, api_uri, params
- print data
-
- try:
- response_data = json.loads(data)
- except ValueError, e:
- # Some data is not JSON
- print "Response data is not JSON"
- sys.exit(1)
-
- print response_data
-
- if response_data['status'] == "OK":
- del response_data['status']
- return response_data['result']
- else:
- return response_data['result']
-