修复云片和亿美软通发送失败的问题

This commit is contained in:
heng 2023-08-28 14:45:25 +08:00
parent 0ac60ba084
commit eeed4fd78e
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ public class EmaySmsImpl extends AbstractSmsBlend<EmayConfig> {
try {
Map<String, String> headers = new LinkedHashMap<>(1);
headers.put("Content-Type", Constant.FROM_URLENCODED);
SmsResponse smsResponse = getResponse(http.postJson(url, headers, params));
SmsResponse smsResponse = getResponse(http.postFrom(url, headers, params));
if(smsResponse.isSuccess() || retry == getConfig().getMaxRetries()){
retry = 0;
return smsResponse;

View File

@ -56,7 +56,7 @@ public class YunPianSmsImpl extends AbstractSmsBlend<YunpianConfig> {
Map<String, String> headers = getHeaders();
try {
SmsResponse smsResponse = getResponse(http.postJson(Constant.YUNPIAN_URL + "/sms/tpl_single_send.json", headers, body));
SmsResponse smsResponse = getResponse(http.postFrom(Constant.YUNPIAN_URL + "/sms/tpl_single_send.json", headers, body));
if(smsResponse.isSuccess() || retry == getConfig().getMaxRetries()){
retry = 0;
return smsResponse;
@ -80,7 +80,7 @@ public class YunPianSmsImpl extends AbstractSmsBlend<YunpianConfig> {
Map<String, String> headers = getHeaders();
try {
SmsResponse smsResponse = getResponse(http.postJson(Constant.YUNPIAN_URL + "/sms/tpl_single_send.json", headers, body));
SmsResponse smsResponse = getResponse(http.postFrom(Constant.YUNPIAN_URL + "/sms/tpl_single_send.json", headers, body));
if(smsResponse.isSuccess() || retry == getConfig().getMaxRetries()){
retry = 0;
return smsResponse;