aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-07-01 14:57:03 -0700
committerAnton Tananaev <anton@traccar.org>2023-07-01 14:57:03 -0700
commitcad2b8497c7cbd2cde4e50ec1ce2af1ceb37d02c (patch)
tree972a5187ad2219d706e03060f30ccef4053a32e7 /src/main
parent7c5df536074e850f8f9e35775ca94fd04c3cdd3a (diff)
downloadtrackermap-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.java5
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 {