POST正规化

This commit is contained in:
aozhiwei 2024-07-30 18:38:09 +08:00
parent 5fe5887d22
commit cb97623222
2 changed files with 8 additions and 6 deletions

View File

@ -608,8 +608,8 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
url_params->SetVal("account_id", join_msg->account_id()); url_params->SetVal("account_id", join_msg->account_id());
url_params->SetVal("session_id", join_msg->session_id()); url_params->SetVal("session_id", join_msg->session_id());
url_params->SetVal("version", 1); url_params->SetVal("version", 1);
url_params->SetVal("__POST", join_msg->payload_data()); //url_params->SetVal("__POST", join_msg->payload_data());
HttpProxy::Instance()->HttpGet HttpProxy::Instance()->HttpPost
( (
[cb, custom_room_type] [cb, custom_room_type]
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx) (bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
@ -662,7 +662,8 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
} }
}, },
url.c_str(), url.c_str(),
url_params url_params,
join_msg->payload_data()
); );
} }
} }

View File

@ -216,7 +216,7 @@ void Team::SendTeamBattleReport(Human* sender)
params->SetVal("a", "teamReport"); params->SetVal("a", "teamReport");
params->SetVal("account_id", player->account_id); params->SetVal("account_id", player->account_id);
params->SetVal("session_id", player->session_id); params->SetVal("session_id", player->session_id);
params->SetVal("__POST", post_data->ToJsonStr()); //params->SetVal("__POST", post_data->ToJsonStr());
std::string room_uuid = room->GetRoomUuid(); std::string room_uuid = room->GetRoomUuid();
int team_id = GetTeamId(); int team_id = GetTeamId();
@ -232,7 +232,7 @@ void Team::SendTeamBattleReport(Human* sender)
}); });
return; return;
} }
HttpProxy::Instance()->HttpGet HttpProxy::Instance()->HttpPost
( (
[room_uuid, team_id] [room_uuid, team_id]
(bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx) (bool ok, a8::XObject* rsp_obj, f8::HttpContext* ctx)
@ -266,7 +266,8 @@ void Team::SendTeamBattleReport(Human* sender)
} }
}, },
url.c_str(), url.c_str(),
params params,
post_data->ToJsonStr()
); );
} }