|
@@ -114,7 +114,11 @@ public class EsApiManager extends BaseApiManager {
|
|
|
|
|
|
final Method httpMethod = Method.valueOf(request.getMethod().toUpperCase(Locale.ROOT));
|
|
final Method httpMethod = Method.valueOf(request.getMethod().toUpperCase(Locale.ROOT));
|
|
final CurlRequest curlRequest = new CurlRequest(httpMethod, ResourceUtil.getElasticsearchHttpUrl() + path);
|
|
final CurlRequest curlRequest = new CurlRequest(httpMethod, ResourceUtil.getElasticsearchHttpUrl() + path);
|
|
- curlRequest.header("Content-Type", "application/json;charset=utf-8");
|
|
|
|
|
|
+
|
|
|
|
+ final String contentType = request.getHeader("Content-Type");
|
|
|
|
+ if (StringUtil.isNotEmpty(contentType)) {
|
|
|
|
+ curlRequest.header("Content-Type", contentType);
|
|
|
|
+ }
|
|
|
|
|
|
request.getParameterMap().entrySet().stream().forEach(entry -> {
|
|
request.getParameterMap().entrySet().stream().forEach(entry -> {
|
|
if (entry.getValue().length > 1) {
|
|
if (entry.getValue().length > 1) {
|