import aiohttp async def post(url, data, headers=None): async with aiohttp.ClientSession(headers=headers) as session: result = await session.post(url, data=data) return await result.read() async def post_return_json(url, data, headers=None): async with aiohttp.ClientSession(headers=headers) as session: result = await session.post(url, data=data) return await result.json() async def get(url, headers=None, **kwargs): async with aiohttp.ClientSession(headers=headers) as session: result = await session.get(url, data=kwargs) return await result.json()
python 调用第三方接口方法
最新推荐文章于 2025-05-08 11:26:24 发布