Home | History | Annotate | Download | only in okhttp

Lines Matching defs:contentType

29   public abstract MediaType contentType();
44 * contentType} is non-null and lacks a charset, this will use UTF-8.
46 public static RequestBody create(MediaType contentType, String content) {
48 if (contentType != null) {
49 charset = contentType.charset();
52 contentType = MediaType.parse(contentType + "; charset=utf-8");
56 return create(contentType, bytes);
60 public static RequestBody create(final MediaType contentType, final ByteString content) {
62 @Override public MediaType contentType() {
63 return contentType;
77 public static RequestBody create(final MediaType contentType, final byte[] content) {
78 return create(contentType, content, 0, content.length);
82 public static RequestBody create(final MediaType contentType, final byte[] content,
87 @Override public MediaType contentType() {
88 return contentType;
102 public static RequestBody create(final MediaType contentType, final File file) {
106 @Override public MediaType contentType() {
107 return contentType;