Re: How best to fetch a web page...

On Tuesday 25 January 2005 11:42, Hubert Sokolowski wrote:

And as an alternative, any suggestions on fundamentally better ways of
fetching a web page asynchonously?  I'm more than willing to do something
drastically simple instead but dastedly effective, and forgo the whole
g_spawn_* experience for now just to have a working program instead.

the easiest way is to use gnet library ( that depends
on glib.

The latest GNet release (2.0.5) doesn't have support for http yet 
unfortunately, only the latest snapshot (from Oct 7) has the new GConnHttp 

As for fetching a web page by spawning wget, check out the code here:

(could be improved by using g_child_watch_add() to find out when wget has 
finished and to get its exit status).


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