Skip to content

Commit

Permalink
fix http header
Browse files Browse the repository at this point in the history
  • Loading branch information
huzongyao committed Jan 30, 2019
1 parent 67477ea commit bde2a4a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Headers;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
Expand Down Expand Up @@ -44,8 +43,7 @@ public void sendRequest(WXRequest request, OnHttpListener listener) {
String bodyString = request.body == null ? "{}" : request.body;

RequestBody body = HttpMethod.requiresRequestBody(method) ?
RequestBody.create(MediaType.parse("application/json"), bodyString)
: null;
RequestBody.create(null, bodyString) : null;

Headers.Builder headersBuilder = new Headers.Builder();
if (request.paramMap != null) {
Expand Down

0 comments on commit bde2a4a

Please sign in to comment.