mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
feat: curl 没有传回 response 而是传回报错信息的时候也允许重试
This commit is contained in:
@@ -39,7 +39,9 @@ namespace asst
|
||||
http::Response report(
|
||||
const std::string& subtask, const std::string& format,
|
||||
HttpResponsePred success_cond = [](const http::Response& response) -> bool { return response.success(); },
|
||||
HttpResponsePred retry_cond = [](const http::Response& response) -> bool { return response.status_5xx(); });
|
||||
HttpResponsePred retry_cond = [](const http::Response& response) -> bool {
|
||||
return !response.status_code() || response.status_5xx();
|
||||
});
|
||||
|
||||
ReportType m_report_type = ReportType::Invaild;
|
||||
std::string m_body;
|
||||
|
||||
Reference in New Issue
Block a user