Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.
This repository was archived by the owner on May 31, 2021. It is now read-only.

HTTP Client Example is not working #36

@rohitchormale

Description

@rohitchormale

HTTP client example mentioned in below link is not working - latset readthedocs

Below is the valid example from aiohttp docs

import aiohttp
import asyncio

async def fetch(session, url):
    async with session.get(url) as response:
        return await response.text()

async def main():
    async with aiohttp.ClientSession() as session:
        html = await fetch(session, 'http://python.org')
        print(html)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions