Created
September 14, 2016 14:50
-
-
Save AleksandrIakhnev/6541a3b3d47a84fc55ffd4790b8bb1e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aiohttp | |
import asyncio | |
async def test(): | |
with aiohttp.ClientSession() as session: | |
with aiohttp.MultipartWriter() as mpwriter: | |
data = "\n".join(["My multipart command "]) | |
mpwriter.append(data, headers={'Content-Transfer-Encoding':'binary'}) | |
async with session.post("https://google.com", data=mpwriter) as response: | |
print(response.status) | |
asyncio.get_event_loop().run_until_complete(test()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment