Deletes a comment. This example deletes comment (id=10019) for the issue with key = "SCRUM-15". A successful response is indicated by a 204 response code with no response body.
curl --request DELETE --user jira@example.com:JIRA_API_TOKEN \
--header 'Accept: application/json' \
--url 'https://your-domain.atlassian.net/rest/api/2/issue/SCRUM-15/comment/10019'
#include <CkRestW.h>
#include <CkStringBuilderW.h>
void ChilkatSample(void)
{
CkRestW rest;
bool success;
// URL: https://your-domain.atlassian.net/rest/api/2/issue/SCRUM-15/comment/10019
bool bTls = true;
int port = 443;
bool bAutoReconnect = true;
success = rest.Connect(L"your-domain.atlassian.net",port,bTls,bAutoReconnect);
if (success != true) {
wprintf(L"ConnectFailReason: %d\n",rest.get_ConnectFailReason());
wprintf(L"%s\n",rest.lastErrorText());
return;
}
rest.SetAuthBasic(L"jira@example.com",L"JIRA_API_TOKEN");
rest.AddHeader(L"Accept",L"application/json");
CkStringBuilderW sbResponseBody;
success = rest.FullRequestNoBodySb(L"DELETE",L"/rest/api/2/issue/SCRUM-15/comment/10019",sbResponseBody);
if (success != true) {
wprintf(L"%s\n",rest.lastErrorText());
return;
}
int respStatusCode = rest.get_ResponseStatusCode();
if (respStatusCode >= 400) {
wprintf(L"Response Status Code = %d\n",respStatusCode);
wprintf(L"Response Header:\n");
wprintf(L"%s\n",rest.responseHeader());
wprintf(L"Response Body:\n");
wprintf(L"%s\n",sbResponseBody.getAsString());
return;
}
}