Skip to content

Commit

Permalink
kv方式的post增加默认头
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix committed Oct 25, 2015
1 parent c2bcd4a commit e5317e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/edu/scup/io/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static String post(String url, Map<String, String> keyValueMap) throws IO
if (body.endsWith("&")) {
body = body.substring(0, body.length() - 1);
}
return post(url, body.getBytes(), null, null);
return post(url, body.getBytes(), "application/x-www-form-urlencoded; charset=UTF-8", null);
}

public static String post(String url, byte[] body, String contentType, Map<String, String> headers) throws IOException {
Expand Down

0 comments on commit e5317e0

Please sign in to comment.