title: How to change body in OkHttp Response?
body: <p>I'm using retrofit. To catch response i'm using Interceptor:</p>
  
  <pre><code>OkHttpClient okHttpClient = new OkHttpClient();
  okHttpClient.interceptors().add(myinterceptor);
  </code></pre>
  
  <p>here is code of interceptor:</p>
  
  <pre><code>new Interceptor() {
      @Override
      public Response intercept(Chain chain) throws IOException {
          Request request = chain.request();
          Response response = chain.proceed(request);
          if (path.equals("/user")){
              String stringJson = response.body().string();
              JSONObject jsonObject = new JSONObject(stringJson);
              jsonObject.put("key",1);
              //here I need to set this new json to response and then return this response
  </code></pre>
  
  <p>How to change body in OkHttp Response?</p>