ya trash
This commit is contained in:
1 parent
ef3fa2b0c7
commit
1ce449320c
75 files changed
+103953
-1264
No files matched your search
@@ -39,6 +39,15 @@ async def post(url, data, params={}, headers={}):
|
||||
|
||||
|
||||
async def put(url, data):
|
||||
async with aiohttp.ClientSession as session:
|
||||
res = session.put(url, data=data)
|
||||
return await res.text()
|
||||
# login, password = settings.upload_auth
|
||||
login, password = ('uploader', '207690962638465')
|
||||
|
||||
auth = aiohttp.BasicAuth(login, password, encoding='utf-8')
|
||||
|
||||
async with aiohttp.request('put', url=url, data=data, auth=auth) as resp:
|
||||
print(resp.status)
|
||||
print(await resp.text())
|
||||
|
||||
# async with aiohttp.ClientSession(auth=auth) as session:
|
||||
# res = session.put(url, data=data)
|
||||
# return await res.text()
|
||||
Reference in new issue
Block a user