KIO: how to get the header fields

David Faure dfaure at trolltech.com
Fri May 2 15:52:06 BST 2003


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

On Friday 02 May 2003 16:38, Koos Vriezen wrote:
> On Fri, 2 May 2003, Dawit A. wrote:
> 
> > On Friday 02 May 2003 08:29, Koos Vriezen wrote:
> >
> > > What I would like is the response code 404 and the header fields (I'am
> > > able to get both the mimetype and metadata field). How do I do that with
> > > kio?
> >
> > Tell kio_http to send you the header information. It doesn't do that by
> > default:
> >
> > job->addMetaData("PropagateHttpHeader", "true");
> >
> > To retrieve the returned header, simply query for "HTTP-Headers" meta-data in
> > the slot that is connected to receive the incoming data:
> >
> > QString headers = job->queryMetaData("HTTP-Headers");
> >
> > Each header line is separated by "\n" so you can use QStringList::split to get
> > the individual lines...
> 
> Nice, thanks! Btw, should this info be somewhere in kio/job*.h?

Rather in kdelibs/kio/DESIGN.metadata

- -- 
David FAURE, faure at kde.org, sponsored by TrollTech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
How to write a Makefile.am for KDE/Qt code:
http://developer.kde.org/documentation/other/makefile_am_howto.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+soYW72KcVAmwbhARAtMiAJ9zWjoBXlWOeaWbSgqNgikC3KJy4QCgnX+q
8w8rXRVxhZWlj2EosUap0ZY=
=P01T
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list