My method is as follows:
public String submitMaterials(String url,JSONObject params) {
return HttpRequest
.create("put", url)
.mediaType(MediaType.APPLICATION_JSON_UTF8_VALUE)
.body(params.toJSONString())
.send()
.bodyText();
}
The parameters I import:


Please help me,thanks!
Don't use the
mediaType, it is just a part of ContentType, that does not set the encoding. So just use thecontentType()instead:Note that you can use 2-argument version of
contentTypethat sends media type and the content:Write version of
mediaTypemethod will be removed just not to confuse people. See the javadoc too.