|
|
|
@ -17,6 +17,8 @@ import java.util.Map;
|
|
|
|
|
import javax.ws.rs.ForbiddenException;
|
|
|
|
|
import javax.ws.rs.NotFoundException;
|
|
|
|
|
import javax.ws.rs.WebApplicationException;
|
|
|
|
|
import javax.ws.rs.core.HttpHeaders;
|
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
|
|
|
|
|
|
import org.gcube.common.gxhttp.reference.GXConnection.HTTPMETHOD;
|
|
|
|
|
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
|
|
|
|
@ -130,6 +132,8 @@ abstract class GCatClient {
|
|
|
|
|
if(queryParams!=null && queryParams.size()>0) {
|
|
|
|
|
gxhttpStringRequest.queryParams(queryParams);
|
|
|
|
|
}
|
|
|
|
|
gxhttpStringRequest.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
|
|
|
|
|
gxhttpStringRequest.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
|
|
|
|
|
HttpURLConnection httpURLConnection = gxhttpStringRequest.post(body);
|
|
|
|
|
return parseHttpURLConnection(httpURLConnection);
|
|
|
|
|
}catch (WebApplicationException e) {
|
|
|
|
|