diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-12-03 18:51:13 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-12-03 20:11:03 +0200 |
commit | 107ffc0a60de703d84957cf6d8948ed7d61d7362 (patch) | |
tree | 624cddece68a78d3f66c3ec02c002e34e7057e3a /yarns/lib.py | |
parent | dd250d5a64d81ed247ce8e19fc300feaaa1e44c9 (diff) | |
download | ick2-107ffc0a60de703d84957cf6d8948ed7d61d7362.tar.gz |
Add: scenario for testing blob service
Diffstat (limited to 'yarns/lib.py')
-rw-r--r-- | yarns/lib.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/yarns/lib.py b/yarns/lib.py index 486757c..00db015 100644 --- a/yarns/lib.py +++ b/yarns/lib.py @@ -122,6 +122,15 @@ def put(url, body_text, token): return r.status_code, r.headers['Content-Type'], dict(r.headers), r.text +def put_blob(url, body, token): + headers = { + 'Authorization': 'Bearer {}'.format(token), + 'Content-Type': 'application/octet-stream', + } + r = requests.put(url, headers=headers, data=body, verify=False) + return r.status_code, r.headers['Content-Type'], dict(r.headers), r.text + + def delete(url, token): headers = { 'Authorization': 'Bearer {}'.format(token), |