本文整理汇总了C++中HttpResponse::getMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ HttpResponse::getMessage方法的具体用法?C++ HttpResponse::getMessage怎么用?C++ HttpResponse::getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpResponse
的用法示例。
在下文中一共展示了HttpResponse::getMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: name
/** Adds the server
*
* This method uses the dialog's informations with CurlServerAdd to
* submit an administration form to add the server. It is called by
* the onOkClicked callback is the controls found no error.
*
*/
void RainbruRPG::Gui::AddServer::addServer(){
std::string name(tfServerName->getText().text());
std::string uniqueName(tfServerUniqueName->getText().text());
std::string type=StringConv::getSingleton()
.itos(cbServerType->getCurrentItem()+1);
std::string ip (tfServerIp->getText().text());
std::string port(tfServerPort->getText().text());
std::string ftp (tfServerFtp->getText().text());
std::string cli (tfServerCli->getText().text());
std::string desc(txtDesc->getText().text());
std::string tech(txtTech->getText().text());
LOGI("Setting posted data :");
LOGCATS("Server name : '");
LOGCATS(name.c_str());
LOGCATS("'");
LOGCAT();
LOGCATS("Server IP : '");
LOGCATS(ip.c_str());
LOGCATS("'");
LOGCAT();
LOGCATS("Server port : '");
LOGCATS(port.c_str());
LOGCATS("'");
LOGCAT();
LOGCATS("Server maxClients : '");
LOGCATS(cli.c_str());
LOGCATS("'");
LOGCAT();
CurlServerAdd csa;
csa.setName(name);
csa.setUniqueName(uniqueName);
csa.setType(type);
csa.setIpAddress(ip);
csa.setPort(port);
csa.setFtpPort(ftp);
csa.setMaxClients(cli);
csa.setDescription( desc);
csa.setTechNote( tech);
// csa.setPostedData("technote", tech);
bool per=csa.perform();
if (per){
LOGI("The form was correctly posted");
}
else{
HttpResponse hr;
long resp=csa.getServerResponse();
const char* mes=hr.getMessage(resp);
LOGCATS("HTTP rsponse :");
LOGCATS(mes);
}
}