public string sendDelete(string endPoint)
{
HttpWebRequest request = CreateWebRequestDelete(endPoint);
try
{
using (var response = (HttpWebResponse)request.GetResponse())
{
var responseValue = string.Empty;
if (response.StatusCode != HttpStatusCode.OK)
{
string message = String.Format("DELETE failed. Received HTTP {0}", response.StatusCode);
throw new ApplicationException(message);
}
// grab the response
using (var responseStream = response.GetResponseStream())
{
using (var reader = new StreamReader(responseStream))
{
responseValue = reader.ReadToEnd();
}
}
return responseValue;
}
}
catch (Exception ex)
{
return null;
}
}
private HttpWebRequest CreateWebRequestDelete(string endPoint)
{
var request = (HttpWebRequest)WebRequest.Create(endPoint);
request.Method = "DELETE";
request.ContentLength = 0;
request.ContentType = "text/xml";
return request;
}
public string deleteTag(string nameTag)
{
try
{
String ticket = admon.getTicketConector();
String url = server + "/alfresco/service/api/tags/workspace/SpacesStore/" + nameTag + "?alf_ticket=" + ticket;
return sendDelete(url);
}
catch(Exception ex)
{
throw ex;
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.