From 1ec71f6df84367c162e2546505524579685210b7 Mon Sep 17 00:00:00 2001 From: SristiSingh-eu Date: Tue, 3 Dec 2024 12:18:21 +0100 Subject: [PATCH] EA-4015 FIX serach api client --- .../set/search/service/impl/SearchApiClientImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/set-search-api-client/src/main/java/eu/europeana/set/search/service/impl/SearchApiClientImpl.java b/set-search-api-client/src/main/java/eu/europeana/set/search/service/impl/SearchApiClientImpl.java index b74379e5..8a8df077 100644 --- a/set-search-api-client/src/main/java/eu/europeana/set/search/service/impl/SearchApiClientImpl.java +++ b/set-search-api-client/src/main/java/eu/europeana/set/search/service/impl/SearchApiClientImpl.java @@ -171,9 +171,9 @@ public JSONObject searchItems(String uri, String postBody) throws SearchApiClien CloseableHttpResponse jsonResponse; try { if (postBody != null) { - jsonResponse = createHttpConnection().post(uri, postBody, null, null); + jsonResponse = createHttpConnection().post(uri, postBody, "application/json", null); } else { - jsonResponse = createHttpConnection().get(uri, null, null); + jsonResponse = createHttpConnection().get(uri, "application/json", null); } if (jsonResponse == null) { // HTTP Error Code