Browse Source

Merged from branch

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/gcat-client@179478 82a268e6-3cf1-43bd-a215-b396298e98cf
feature/17645
Luca Frosini 3 years ago
parent
commit
e6bef5797d
  1. 4
      src/main/java/org/gcube/gcat/client/GCatClient.java

4
src/main/java/org/gcube/gcat/client/GCatClient.java

@ -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) {

Loading…
Cancel
Save