This commit is contained in:
Will McGugan
2024-06-18 15:40:38 +01:00
parent d63622a16a
commit 5da3f89a6f
2 changed files with 1 additions and 6 deletions

View File

@@ -40,8 +40,6 @@ class DictionaryApp(App):
"""Looks up a word."""
url = f"https://api.dictionaryapi.dev/api/v2/entries/en/{word}"
1 / 0
async with httpx.AsyncClient() as client:
response = await client.get(url)
try:

View File

@@ -176,14 +176,11 @@ class Server:
try:
await websocket.prepare(request)
async def on_close():
await websocket.close()
app_service = AppService(
self.command,
write_bytes=websocket.send_bytes,
write_str=websocket.send_str,
close=on_close,
close=websocket.close,
debug=self.debug,
)
await app_service.start(width, height)