diff options
Diffstat (limited to 'yarns/lib.py')
-rw-r--r-- | yarns/lib.py | 8 |
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 |