diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-12-03 19:07:24 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-12-03 20:12:51 +0200 |
commit | 4e9b1ddfae711ce38d743a3faccf49447ab10f75 (patch) | |
tree | 104858cae517e80b1507c0519fc21885c2a605f2 /yarns/lib.py | |
parent | 107ffc0a60de703d84957cf6d8948ed7d61d7362 (diff) | |
download | ick2-4e9b1ddfae711ce38d743a3faccf49447ab10f75.tar.gz |
Add: blob service
Diffstat (limited to 'yarns/lib.py')
-rw-r--r-- | yarns/lib.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/yarns/lib.py b/yarns/lib.py index 00db015..6575e6d 100644 --- a/yarns/lib.py +++ b/yarns/lib.py @@ -104,6 +104,14 @@ def get(url, token): return r.status_code, r.headers['Content-Type'], dict(r.headers), r.text +def get_blob(url, token): + headers = { + 'Authorization': 'Bearer {}'.format(token), + } + r = requests.get(url, headers=headers, verify=False) + return r.status_code, r.headers['Content-Type'], dict(r.headers), r.content + + def post(url, body_text, token): headers = { 'Authorization': 'Bearer {}'.format(token), |