title: Okhttp3 - RequestBody.create(contentType, content) Deprecated
body: <p>I did not find any example of how to replace the deprecation method.
  The examples on the okhttp3 main page are old.
  This is one of them:</p>
  
  <pre><code>public static final MediaType JSON = MediaType.get("application/json; charset=utf-8");
  
  OkHttpClient client = new OkHttpClient();
  
  String post(String url, String json) throws IOException {
      RequestBody body = RequestBody.create(JSON, json);
        Request request = new Request.Builder()
            .url(url)
            .post(body)
            .build();
    try (Response response = client.newCall(request).execute()) {
      return response.body().string();
    }
  }
  </code></pre>
  
  <p>If someone could solve it, I would appreciate your help.</p>
  
  <p>Update:
       I'm using 'com.squareup.okhttp3:okhttp:4.0.1'</p>