diff examples/_run_server_child.py @ 10:52e1bb1532f2

serve_inline_graph
author drewp@bigasterisk.com
date Sat, 16 Mar 2024 16:02:23 -0700
parents 25538e3ee531
children 0bc06da6bf74
line wrap: on
line diff
--- a/examples/_run_server_child.py	Sat Mar 16 13:45:09 2024 -0700
+++ b/examples/_run_server_child.py	Sat Mar 16 16:02:23 2024 -0700
@@ -20,9 +20,9 @@
         self.subprocess.terminate()
         await self.subprocess.wait()
 
-    async def get(self, url: str) -> aiohttp.ClientResponse:
+    async def get(self, url: str, headers=None) -> aiohttp.ClientResponse:
         while True:
             try:
-                return await self._session.get(url)
+                return await self._session.get(url, headers=headers)
             except aiohttp.ClientConnectorError:
                 await asyncio.sleep(0.05)