How to compile: pkg-config --libs soup-2.0 Some code examples (async): 1. Evolution: MAIL while (e_dlist_length(&p->fetch_active) < FETCH_MAX_CONNECTIONS && (rd = (struct _remote_data *)e_dlist_remhead(&p->fetch_queue))) { ctx = soup_context_get(rd->uri); rd->msg = msg = soup_message_new(ctx, SOUP_METHOD_GET); if (ctx) soup_context_unref(ctx); soup_message_set_flags(msg, SOUP_MESSAGE_OVERWRITE_CHUNKS); soup_message_add_handler(msg, SOUP_HANDLER_BODY_CHUNK, fetch_data, rd); e_dlist_addtail(&p->fetch_active, (EDListNode *)rd); soup_message_queue(msg, fetch_done, rd); } WEATHER for (w = summary->weather->weathers; w; w = w->next) { SoupContext *context; char *uri; Weather *weather = w->data; if (weather->message != NULL) { continue; } uri = g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", weather->location); context = soup_context_get (uri); if (context == NULL) { g_warning ("Invalid URL: %s", uri); soup_context_unref (context); g_free (uri); continue; } weather->message = soup_message_new (context, SOUP_METHOD_GET); soup_context_unref (context); soup_message_queue (weather->message, message_finished, weather); g_free (uri); } static void message_finished (SoupMessage *msg, gpointer userdata) { Weather *w = (Weather *) userdata; ESummary *summary; char *html, *metar, *end; char *search_str; .... if (SOUP_MESSAGE_IS_ERROR (msg)) { ... } html = g_strdup (msg->response.body); w->message = NULL; /* Find the metar data */ search_str = g_strdup_printf ("\n%s", w->location); ... }