Can someone help me in writing the code for Waiting for readyread and requestfinished signal?

I am using this code to connect the signal, but i need both the signals to be emitted and then perform some function,

Qt Code:
  1. connect(&http, SIGNAL(readyRead(const QHttpResponseHeader &)),
  2. this, SLOT(readData(const QHttpResponseHeader &)));
  3.  
  4. connect(&http, SIGNAL(requestFinished(int, bool)),
  5. this, SLOT(finished(int, bool)));
To copy to clipboard, switch view to plain text mode