void SendUsage::sendReport(const std::string &json) { g_log.debug() << json << "\n"; int status = STATUS_DEFAULT; try { Kernel::InternetHelper helper; std::stringstream responseStream; helper.setBody(json); status = helper.sendRequest(URL, responseStream); g_log.debug() << "Call to \"" << URL << "\" responded with " << status << "\n" << responseStream.str() << "\n"; } catch (Mantid::Kernel::Exception::InternetError &e) { status = e.errorCode(); g_log.information() << "Call to \"" << URL << "\" responded with " << status << "\n" << e.what() << "\n"; } this->setProperty("HtmlCode", status); }