@@ -39,34 +39,34 @@ public final class MultipartBody extends RequestBody {
3939 * need to be bundled in a particular order. Any "multipart" subtypes that an implementation does
4040 * not recognize must be treated as being of subtype "mixed".
4141 */
42- public static final MediaType MIXED = MediaType .get ("multipart/mixed" );
42+ public static final MediaType MIXED = MediaType .parse ("multipart/mixed" );
4343
4444 /**
4545 * The "multipart/alternative" type is syntactically identical to "multipart/mixed", but the
4646 * semantics are different. In particular, each of the body parts is an "alternative" version of
4747 * the same information.
4848 */
49- public static final MediaType ALTERNATIVE = MediaType .get ("multipart/alternative" );
49+ public static final MediaType ALTERNATIVE = MediaType .parse ("multipart/alternative" );
5050
5151 /**
5252 * This type is syntactically identical to "multipart/mixed", but the semantics are different. In
5353 * particular, in a digest, the default {@code Content-Type} value for a body part is changed from
5454 * "text/plain" to "message/rfc822".
5555 */
56- public static final MediaType DIGEST = MediaType .get ("multipart/digest" );
56+ public static final MediaType DIGEST = MediaType .parse ("multipart/digest" );
5757
5858 /**
5959 * This type is syntactically identical to "multipart/mixed", but the semantics are different. In
6060 * particular, in a parallel entity, the order of body parts is not significant.
6161 */
62- public static final MediaType PARALLEL = MediaType .get ("multipart/parallel" );
62+ public static final MediaType PARALLEL = MediaType .parse ("multipart/parallel" );
6363
6464 /**
6565 * The media-type multipart/form-data follows the rules of all multipart MIME data streams as
6666 * outlined in RFC 2046. In forms, there are a series of fields to be supplied by the user who
6767 * fills out the form. Each field has a name. Within a given form, the names are unique.
6868 */
69- public static final MediaType FORM = MediaType .get ("multipart/form-data" );
69+ public static final MediaType FORM = MediaType .parse ("multipart/form-data" );
7070
7171 private static final byte [] COLONSPACE = {':' , ' ' };
7272 private static final byte [] CRLF = {'\r' , '\n' };
@@ -81,7 +81,7 @@ public final class MultipartBody extends RequestBody {
8181 MultipartBody (ByteString boundary , MediaType type , List <Part > parts ) {
8282 this .boundary = boundary ;
8383 this .originalType = type ;
84- this .contentType = MediaType .get (type + "; boundary=" + boundary .utf8 ());
84+ this .contentType = MediaType .parse (type + "; boundary=" + boundary .utf8 ());
8585 this .parts = Util .immutableList (parts );
8686 }
8787
0 commit comments