09-07-2012 11:40 AM
RemoteClient remote = new RemoteClient();
remote.setEndpoint("http");
remote.setRequestMethod(HttpMethod.POST);
remote.setRequestContentType("application/json");
remote.setTicket(ticket);
Map<String, String> properties = new HashMap<String, String>();
properties.put("shortName", siteShortName);
properties.put("sitePreset", sitePreset);
properties.put("title", siteTitle);
properties.put("description", siteDesc);
properties.put("visibility", "PUBLIC");
properties.put("ticket", ticket);
JSONObject json = new JSONObject(properties);
Response response = remote.call("http://localhost:8080/share/service/modules/create-site", json.toString());
if(clientJSON.ticket)
{
repoResponse = scriptRemoteConnector.post("/api/sites?alf_ticket="+clientJSON.ticket, clientRequest, "application/json");
}
else
{
repoResponse = scriptRemoteConnector.post("/api/sites", clientRequest, "application/json");
}
11-12-2013 03:44 PM
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<rule>
<request>
<method>POST</method>
<path>/service/modules/create-site</path>
</request>
<action name="assertReferer">
<param name="always">false</param>
</action>
<action name="assertOrigin">
<param name="always">false</param>
</action>
</rule>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.