Best way to get data from an http URL

View: New views
2 Messages — Rating Filter:   Alert me  

Best way to get data from an http URL

by Kevin DeKorte-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm looking at trying to get a simple xml file back from a web site and
I'm wondering if glib has anything that can do that for me, or do I need
to go to another lib like libsoup. Any recommendations?

Thanks,

Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIYXtN6w2kMH0L1dERAiUYAJ9wL7XXBqWwiKWYGU9RQNeIscuukACfWQKX
ftji5YNb9Ky4DOToIUEyRxo=
=4Wx6
-----END PGP SIGNATURE-----
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Best way to get data from an http URL

by Murray Cumming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2008-06-24 at 16:55 -0600, Kevin DeKorte wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'm looking at trying to get a simple xml file back from a web site and
> I'm wondering if glib has anything that can do that for me, or do I need
> to go to another lib like libsoup. Any recommendations?

glib's gio can do this. Just create a GFile for the URI:
http://library.gnome.org/devel/gio/stable/GFile.html#g-file-new-for-uri

Then you could use g_file_read() or g_file_read_async(). Then you could
use g_input_stream_read_all() or g_input_stream_read_async().

--
murrayc@...
www.murrayc.com
www.openismus.com

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list