Adding support for JSON:API for licenses

This commit is contained in:
Luca Frosini 2023-02-17 14:31:46 +01:00
parent 0a79e2d769
commit 7453f3be78
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ public class License extends REST<CKANLicense> implements org.gcube.gcat.api.int
public String list() throws WebServiceException {
String ret = super.list(-1, -1);
String accept = httpHeaders.getHeaderString("Accept");
if(accept.compareTo(GCatConstants.APPLICATION_JSON_API)==0) {
if(accept.contains(GCatConstants.APPLICATION_JSON_API)) {
ObjectMapper objectMapper = new ObjectMapper();
ObjectNode objectNode = objectMapper.createObjectNode();
try {