Builder body(ResponseBody body) { try { this.body = body.bytes(); } catch (IOException e) { throw new RuntimeException(e); } MediaType contentType = body.contentType(); if (contentType != null && headers.get(Util.CONTENT_TYPE) == null) { addHeader(Util.CONTENT_TYPE, contentType.toString()); } return this; }
Builder body(ResponseBody body) { try { this.body = body.bytes(); } catch (IOException e) { throw new RuntimeException(e); } MediaType contentType = body.contentType(); if (contentType != null && headers.get(Util.CONTENT_TYPE) == null) { addHeader(Util.CONTENT_TYPE, contentType.toString()); } return this; }