封装的OkHttpUtils
工具类
1 | import okhttp3.Callback; |
发送post请求
1 | RequestBody requestBody = RequestBody.create(content, MediaType.parse("text/x-markdown; charset=utf-8")); |
发送get请求
1 | OkHttpUtils.getInstance().url(url).get(newCallback() { |
工具类
1 | import okhttp3.Callback; |
发送post请求
1 | RequestBody requestBody = RequestBody.create(content, MediaType.parse("text/x-markdown; charset=utf-8")); |
发送get请求
1 | OkHttpUtils.getInstance().url(url).get(newCallback() { |