Wireshark-dev: Re: [Wireshark-dev] HTTP library reccommendations
From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Fri, 09 Sep 2011 11:19:37 -0700
On 9/7/11 9:34 AM, Guy Harris wrote:
> 
> On Sep 7, 2011, at 9:30 AM, Trimble, Nathan G wrote:
> 
>> I have a need to perform a couple HTTP operations from code in our Wireshark plugin.  I am wondering if Wireshark already depends on any libraries that support HTTP.
> 
> It does not.  There are some UI items that will hand a URL to the desktop environment's "open a URL" operation, but that relies on the user's chosen browser to do all the work and open a window to display the URL; it does not do any of the work of fetching or displaying the page itself (and it shouldn't - it should have the user's browser do it).
> 
>> If there are not any existing dependencies that would support an HTTP GET and PUT, do you have any recommendations?
> 
> No, I don't.

You might be able to do this via the GFile routines in GIO (e.g.
g_file_new_for_uri + g_file_read_async). Unfortunately the documentation
seems to go out of its way to avoid specific use cases, e.g. reading a
file over HTTP:

http://developer.gnome.org/gio/stable/GFile.html