response.body().string()和response.body().toString(),如果想看到服務器返回的字符串,請使用 response.body().string()
若是使用response.body().toString()則出現:
org.json.JSONException:
Value okhttp3.internal.http.RealResponseBody@9a7c1d8 of type java.lang.String cannot be converted to JSONObject