summaryrefslogtreecommitdiff
path: root/yarns/lib.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-12-15 16:54:49 +0200
committerLars Wirzenius <liw@liw.fi>2017-12-15 16:54:49 +0200
commit04c80ff3559577ea48e71b14b39df350f937f24a (patch)
treea958c9ae3d1bfe0e1ff68c291a8bc5ce600a4176 /yarns/lib.py
parent51edd7a26118ebe7b6d94bd331d09f64d8675a55 (diff)
downloadick2-04c80ff3559577ea48e71b14b39df350f937f24a.tar.gz
Refactor: rename body_text to body throughout
Diffstat (limited to 'yarns/lib.py')
-rw-r--r--yarns/lib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yarns/lib.py b/yarns/lib.py
index 8f885c0..b19ccf3 100644
--- a/yarns/lib.py
+++ b/yarns/lib.py
@@ -120,21 +120,21 @@ def get_blob(url, token):
return r.status_code, r.headers['Content-Type'], dict(r.headers), r.content
-def post(url, body_text, token):
+def post(url, body, token):
headers = {
'Authorization': 'Bearer {}'.format(token),
'Content-Type': 'application/json',
}
- r = requests.post(url, headers=headers, data=body_text, verify=False)
+ r = requests.post(url, headers=headers, data=body, verify=False)
return r.status_code, r.headers['Content-Type'], dict(r.headers), r.text
-def put(url, body_text, token):
+def put(url, body, token):
headers = {
'Authorization': 'Bearer {}'.format(token),
'Content-Type': 'application/json',
}
- r = requests.put(url, headers=headers, data=body_text, verify=False)
+ r = requests.put(url, headers=headers, data=body, verify=False)
return r.status_code, r.headers['Content-Type'], dict(r.headers), r.text