convert all text/* content types to strings in the apache http java client (#18731)

This commit is contained in:
aaronforest-wf
2024-05-23 03:36:34 -05:00
committed by GitHub
parent 00c1ceffcd
commit 235b57e499
3 changed files with 3 additions and 3 deletions

View File

@@ -859,7 +859,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
}
return objectMapper.readValue(content, valueType);
} else if ("text/plain".equalsIgnoreCase(mimeType)) {
} else if (mimeType.toLowerCase().startsWith("text/")) {
// convert input stream to string
return (T) EntityUtils.toString(entity);
} else {

View File

@@ -777,7 +777,7 @@ public class ApiClient extends JavaTimeFormatter {
}
return objectMapper.readValue(content, valueType);
} else if ("text/plain".equalsIgnoreCase(mimeType)) {
} else if (mimeType.toLowerCase().startsWith("text/")) {
// convert input stream to string
return (T) EntityUtils.toString(entity);
} else {

View File

@@ -870,7 +870,7 @@ public class ApiClient extends JavaTimeFormatter {
}
return objectMapper.readValue(content, valueType);
} else if ("text/plain".equalsIgnoreCase(mimeType)) {
} else if (mimeType.toLowerCase().startsWith("text/")) {
// convert input stream to string
return (T) EntityUtils.toString(entity);
} else {