public String requestOkHttp(String url, String method, String json) throws IOException {
RequestBody requestBody;
requestBody = METHOD_POST.equals(method) || METHOD_PUT.equals(method) ?
RequestBody.create(JSON, json == null ? "" : json) : null;
okhttp3.Request.Builder requestBuilder = new okhttp3.Request.Builder()
.url(url);
requestBuilder.method(method, requestBody);
OkHttpClient client = new OkHttpClient();
Response response = client.newCall(requestBuilder.build()).execute();
return response.body().string();
}