Created
May 26, 2012 02:17
-
-
Save aishraj/2791744 to your computer and use it in GitHub Desktop.
The changed version of the file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "showHttp.h" | |
| #include <kdebug.h> | |
| showHttp::showHttp() | |
| { | |
| output(); | |
| } | |
| showHttp::~showHttp() | |
| {} | |
| void showHttp::output() | |
| { | |
| kDebug() << "entering function"; | |
| // creating a kioslave | |
| //KIO::TransferJob *job = KIO::get(KUrl("http://download.services.openoffice.org/files/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-deb_en-US.tar.gz")); | |
| KIO::TransferJob *job = KIO::get(KUrl("http://www.kde.org")); | |
| job->addMetaData("PropagateHttpHeader","true"); | |
| job->setRedirectionHandlingEnabled(false); | |
| connect (job, SIGNAL( data(KIO::Job *, const QByteArray & )), this, SLOT(headerIsHere(KIO::Job *))); | |
| // connect(job, SIGNAL(result(KJob*)), this, SLOT(headerIsHere(KIO::Job*))); | |
| //connect(job,SIGNAL(result(KJob*)) | |
| } | |
| void showHttp::headerIsHere(KIO::Job* metaJob) | |
| { | |
| QString httpHeaders = metaJob->queryMetaData("HTTP-Headers"); | |
| qDebug() << "data is here"; | |
| qDebug()<< httpHeaders; | |
| exit(0); | |
| } | |
| #include "showHttp.moc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment