Is there support for async clients (like aiohttp)?
I'm running the following code, and the sync version is working fine, but the async version is timing out.
importasyncioimportaiohttpimportflaskimportrequestsfromflask_loopbackimportFlaskLoopbackapp=flask.Flask(__name__)
@app.route("/")defindex():
return"index"asyncdefasync_client():
asyncwithaiohttp.ClientSession() asclient:
asyncwithclient.get("http://mock/") asresponse:
print("async_client", awaitresponse.text())
defsync_client():
print("sync_client", requests.get("http://mock/").text)
withFlaskLoopback(app).on(("mock", 80)):
sync_client()
asyncio.run(async_client())
Is there support for async clients (like aiohttp)?
I'm running the following code, and the sync version is working fine, but the async version is timing out.