From cad2b8497c7cbd2cde4e50ec1ce2af1ceb37d02c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 1 Jul 2023 14:57:03 -0700 Subject: Support XML-based SMS APIs --- src/main/java/org/traccar/sms/HttpSmsClient.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/sms/HttpSmsClient.java b/src/main/java/org/traccar/sms/HttpSmsClient.java index 683022967..b4271a6f2 100644 --- a/src/main/java/org/traccar/sms/HttpSmsClient.java +++ b/src/main/java/org/traccar/sms/HttpSmsClient.java @@ -57,7 +57,10 @@ public class HttpSmsClient implements SmsManager { } } template = config.getString(Keys.SMS_HTTP_TEMPLATE).trim(); - if (template.charAt(0) == '{' || template.charAt(0) == '[') { + if (template.charAt(0) == '<') { + encode = false; + mediaType = MediaType.APPLICATION_XML_TYPE; + } else if (template.charAt(0) == '{' || template.charAt(0) == '[') { encode = false; mediaType = MediaType.APPLICATION_JSON_TYPE; } else { -- cgit v1.2.3