跳至內容
選單
此問題已被標幟
1 回覆
2731 瀏覽次數

Hi guys,

I have got the following context, i need to call a webapi from python method but i don't want to blocking UI until webapi responde the result.

I did with async/await but i don't get the result, can be that i am doing something bad, can anybody help me to solver it.


example:


async def fn(self):

    result = await callapi-************

    return result


def call_async_method(self):

    asyncio.run(self.fn())

    


頭像
捨棄
2023 looking for the same solution


最佳答案

Hi! im looking for the same solution... Can you resolve this?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
10月 23
5885
0
5月 22
656
2
7月 25
7014
2
7月 25
3349
2
7月 25
3093