这是create的源码:
public static RequestBody create(MediaType contentType, String content) {
Charset charset = Util.UTF_8;
if (contentType != null) {
charset = contentType.charset();
if (charset == null) {
charset = Util.UTF_8;
contentType = MediaType.parse(contentType + "; charset=utf-8");
}
}
byte[] bytes = content.getBytes(charset);
return create(contentType, bytes);
}
这个content是post的话是类似“a=88&b=99”这样的字符串吗?
测试了好几次了。。
private final OkHttpClient client = new OkHttpClient();
public void run() throws Exception {
}