[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Http(s) requests in kde4
From: Kevin Krammer <kevin.krammer () gmx ! at>
Date: 2007-10-15 6:20:00
Message-ID: 200710150820.05622.kevin.krammer () gmx ! at
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday 14 October 2007, Stephen Kelly wrote:
> Hi,
>
> I'm writing my first kde application which will need to make GET and POST
> requests. I'd like it to use system-wide settings(proxy etc), handle
> cookies etc automatically etc.
>
> I looked at KIO::NetAccess, which contains a download() method which seems
> to handle GET, but not POST.
>
> I also found QHttp which offers get() and post(), but seems more
> complicated to use, and wouldn't use the proxy set in konquerorrc (I guess
> at least).
>
> What is the 'correct' way for me to make this happen?
There are a couple of intersting functions in the KIO namespace for this
[1] KIO::get()
[2] KIO::http_post()
They create, setup and start a KIO::Job instance, more specifically a
TransferJob, which will tell you by signals when it has or requires data.
So you just call the functions and then connect to the returned job's signals.
Cheers,
Kevin
[1] http://tinyurl.com/2h52g7
[2] http://tinyurl.com/ypkcj4
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic