Re: How to asynchronous GET with python/GI



On Mon, 2018-10-22 at 20:09 +0200, Florent Thiery wrote:
Hi

I have been struggling to get a working example of an async soup-
based HTTP
client in python. I finally succeeded in making this work, but it
doesn't
feel simple. Is there a simpler way to just get the content into a
python
variable ?

I think the simplest would be for you to use
soup_session_queue_message() instead, which will invoke its callback
only when it has finished reading. Then you can inspect the
SoupMessage.response_body, etc directly instead of having to deal with
input streams, etc.

Claudio



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]