Hi,

The following code doesn't work...
Before calling this method, the http class worked good by initially calling sethost method and then several get methods.

But then I need to send a lot of variables, so the POST method is necessary.

I tested a POST html form to valid my PHP script send.php. Everything is ok.

Also, the SLOT requestFinished is called and no errors are reported...

Any idea? Or a functional POST method example?

Thanks
Oscar


Qt Code:
  1. void MyExport::sendHealthCase(QString recipient) {
  2. QString person = "type=healthcase";
  3. person += "&recipient=" + recipient;
  4. person += "&from=" + email;
  5. Patient patient = Patient::get(patientId);
  6. person += "&table=person";
  7. person += "&civilStatus=" + QString::number(patient.civilStatus);
  8. person += "&surname=" + patient.surname;
  9. connect(http, SIGNAL(requestFinished(int, bool)),
  10. this, SLOT(healthCaseFinished(int, bool)));
  11.  
  12. http->post( QString("/software/send.php"), person.toUtf8());
  13. }
To copy to clipboard, switch view to plain text mode