larksuite-oapi/src/main/java/com/larksuite/oapi/okhttp3_14/ResponseBody.java
public static ResponseBody create(@Nullable MediaType contentType, String content) {
    Charset charset = UTF_8;
    if (contentType != null) {
      charset = contentType.charset();
      if (charset == null) {
        charset = UTF_8;
        contentType = MediaType.parse(contentType + "; charset=utf-8");
      }
    }
    Buffer buffer = new Buffer().writeString(content, charset);
    return create(contentType, buffer.size(), buffer);
  }
/**
   * Returns a new response body that transmits {@code content}. If {@code contentType} is non-null
   * and lacks a charset, this will use UTF-8.
   */
Returns a new response body that transmits  content. If  contentType is non-null
and lacks a charset, this will use UTF-8.
Returns a new response body that transmits content . If contentType is non - null and lacks a charset this will use UTF - 8 .
public static ResponseBody create(@Nullable MediaType contentType, String content) {
    Charset charset = UTF_8;
    if (contentType != null) {
      charset = contentType.charset();
      if (charset == null) {
        charset = UTF_8;
        contentType = MediaType.parse(contentType + "; charset=utf-8");
      }
    }
    Buffer buffer = new Buffer().writeString(content, charset);
    return create(contentType, buffer.size(), buffer);
  }
public static ResponseBody create ( @ Nullable MediaType contentType , String content ) { Charset charset = UTF_8 ; if ( contentType != null ) { charset = contentType . charset ( ) ; if ( charset == null ) { charset = UTF_8 ; contentType = MediaType . parse ( contentType + "; charset=utf-8" ) ; } } Buffer buffer = new Buffer ( ) . writeString ( content , charset ) ; return create ( contentType , buffer . size ( ) , buffer ) ; }
Returns a new response body that transmits {@code content}.
Returns a new response body that transmits { @code content } .