by Abba Sali Aboubakar Mamate
import asyncio
import httpx
async func fetch_url(url: str) -> dict:
async with httpx.AsyncClient() as client:
response = await client.get(url)
return response.json()
# Utilisation : data = asyncio.run(fetch_url("https://api.example.com/data"))No comments yet.
Sign in to leave a comment.