aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/WebDataHandler.java
diff options
context:
space:
mode:
authornativbarak <nativ@globekeeper.com>2018-02-06 10:28:21 +0200
committernativbarak <nativ@globekeeper.com>2018-02-06 10:28:21 +0200
commit4969ecd1d16324f488f01f1f0873e101c1609302 (patch)
tree929b0b49f1aa828dd243f4e0dbc09d11dca60ff1 /src/org/traccar/WebDataHandler.java
parented4a723e518d444bcfd6c310c4ed448b8ee8dedf (diff)
downloadtrackermap-server-4969ecd1d16324f488f01f1f0873e101c1609302.tar.gz
trackermap-server-4969ecd1d16324f488f01f1f0873e101c1609302.tar.bz2
trackermap-server-4969ecd1d16324f488f01f1f0873e101c1609302.zip
removed unneccesary methods
Diffstat (limited to 'src/org/traccar/WebDataHandler.java')
-rw-r--r--src/org/traccar/WebDataHandler.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/org/traccar/WebDataHandler.java b/src/org/traccar/WebDataHandler.java
index 8bfabf183..5a0aab3e4 100644
--- a/src/org/traccar/WebDataHandler.java
+++ b/src/org/traccar/WebDataHandler.java
@@ -132,9 +132,9 @@ public class WebDataHandler extends BaseDataHandler {
AsyncHttpClient.BoundRequestBuilder requestBuilder = Context.getAsyncHttpClient().preparePost(url);
requestBuilder.setBodyEncoding(StandardCharsets.UTF_8.name());
- requestBuilder.addHeader("Content-Type", getContentType());
+ requestBuilder.addHeader("Content-Type", "application/json; charset=utf-8");
- setContent(position, requestBuilder);
+ requestBuilder.setBody(prepareJsonPayload(position));
requestBuilder.execute();
} else {
@@ -143,14 +143,6 @@ public class WebDataHandler extends BaseDataHandler {
return position;
}
- protected String getContentType() {
- return "application/json; charset=utf-8";
- }
-
- protected void setContent(Position position, AsyncHttpClient.BoundRequestBuilder requestBuilder) {
- requestBuilder.setBody(prepareJsonPayload(position));
- }
-
protected String prepareJsonPayload(Position position) {
Map<String, Object> data = new HashMap<>();