diff options
author | Anton Tananaev <anton@traccar.org> | 2023-07-01 14:57:03 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-07-01 14:57:03 -0700 |
commit | cad2b8497c7cbd2cde4e50ec1ce2af1ceb37d02c (patch) | |
tree | 972a5187ad2219d706e03060f30ccef4053a32e7 /src/main | |
parent | 7c5df536074e850f8f9e35775ca94fd04c3cdd3a (diff) | |
download | trackermap-server-cad2b8497c7cbd2cde4e50ec1ce2af1ceb37d02c.tar.gz trackermap-server-cad2b8497c7cbd2cde4e50ec1ce2af1ceb37d02c.tar.bz2 trackermap-server-cad2b8497c7cbd2cde4e50ec1ce2af1ceb37d02c.zip |
Support XML-based SMS APIs
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/sms/HttpSmsClient.java | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |