fixed writepostcatalogue call in the way it builds the request json object
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/catalogue-ws@148361 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
09b904a3be
commit
3052887f9d
|
@ -209,7 +209,10 @@ public class WritePostCatalogueManagerThread extends Thread {
|
|||
|
||||
logger.info("The post that is going to be written is -> " + message);
|
||||
|
||||
HttpResponse response = performRequest(client, path, "{\"text\":\"" + message + "\", \"enable_notification\" : "+ enablePostNotification+ "}");
|
||||
JSONObject objRequest = new JSONObject();
|
||||
objRequest.put("text", message);
|
||||
objRequest.put("enable_notification", enablePostNotification);
|
||||
HttpResponse response = performRequest(client, path, objRequest.toJSONString());
|
||||
int statusWritePost = response.getStatusLine().getStatusCode();
|
||||
|
||||
if(statusWritePost == HttpURLConnection.HTTP_CREATED){
|
||||
|
|
Reference in New Issue