MCPcopy Index your code
hub / github.com/OpenFeign/feign / of

Method of

form/src/main/java/feign/form/ContentType.java:53–65  ·  view source on GitHub ↗

Parses string to content type. @param str string representation of content type. @return ContentType instance or ContentType#UNDEFINED, if there is no such content type.

(String str)

Source from the content-addressed store, hash-verified

51 * content type.
52 */
53 public static ContentType of(String str) {
54 if (str == null) {
55 return UNDEFINED;
56 }
57
58 val trimmed = str.trim();
59 for (val type : values()) {
60 if (trimmed.startsWith(type.getHeader())) {
61 return type;
62 }
63 }
64 return UNDEFINED;
65 }
66}

Callers 15

encodeMethod · 0.95
resolveMethodConfigMethod · 0.45
GraphqlTypeMapperClass · 0.45
customDecoderMethod · 0.45
customEncoderMethod · 0.45
provideValuesToEncodeMethod · 0.45

Calls

no outgoing calls

Tested by 15

customDecoderMethod · 0.36
customEncoderMethod · 0.36
provideValuesToEncodeMethod · 0.36
testUploadMethod · 0.36
testUploadWithParamMethod · 0.36
testMultipleFilesListMethod · 0.36