diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java index cbe99e6..71151d6 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java @@ -218,7 +218,7 @@ public class GeoportalExporter { */ @GET @Path("/export/{type}/healthcheck") - @Produces({ MediaType.TEXT_HTML, MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.TEXT_HTML }) public Response healthcheck(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type) throws WebApplicationException { @@ -247,13 +247,13 @@ public class GeoportalExporter { theJson.setState("OK"); theJson.setMessage(GeoportalExporter.class.getSimpleName() + " Config OK in the context: " + context); String jsonResponse = responseToString(theJson); - return Response.ok(jsonResponse).type(MediaType.APPLICATION_JSON).build(); + return Response.ok(jsonResponse).build(); } else { theJson.setState("KO"); theJson.setMessage(GeoportalExporter.class.getSimpleName() + " Config " + Status.NOT_FOUND.getReasonPhrase() + " in the context: " + context); String jsonResponse = responseToString(theJson); - return Response.status(Status.NOT_FOUND).entity(jsonResponse).type(MediaType.APPLICATION_JSON).build(); + return Response.status(Status.NOT_FOUND).entity(jsonResponse).build(); } } catch (Exception e) {