diff --git a/logpusher/src/main/java/org/weiboad/ragnar/logpusher/CurlThread.java b/logpusher/src/main/java/org/weiboad/ragnar/logpusher/CurlThread.java index bb72fe2..549983a 100644 --- a/logpusher/src/main/java/org/weiboad/ragnar/logpusher/CurlThread.java +++ b/logpusher/src/main/java/org/weiboad/ragnar/logpusher/CurlThread.java @@ -59,8 +59,9 @@ private String postHttp(String url, String postData) { builder.retryOnConnectionFailure(false); OkHttpClient client = builder.build(); - MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded; charset=utf-8"); - RequestBody body = RequestBody.create(mediaType, "contents=" + postData); + //MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded; charset=utf-8"); + RequestBody body = new FormBody.Builder().add("contents", postData).build(); + //RequestBody.create(mediaType, "contents=" + postData); Request request = new Request.Builder() .url(url)