Back to Collection Items
#include <C_CkHttp.h>
#include <C_CkHttpResponse.h>
void ChilkatSample(void)
{
HCkHttp http;
BOOL success;
HCkHttpResponse resp;
int respStatusCode;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttp_Create();
CkHttp_putBasicAuth(http,TRUE);
CkHttp_putLogin(http,"{{auth_id}}");
CkHttp_putPassword(http,"password");
resp = CkHttp_QuickRequest(http,"DELETE","https://api.plivo.com/v1/Account/<auth_id>/Endpoint/{endpoint_id}/");
if (CkHttp_getLastMethodSuccess(http) == FALSE) {
printf("%s\n",CkHttp_lastErrorText(http));
CkHttp_Dispose(http);
return;
}
respStatusCode = CkHttpResponse_getStatusCode(resp);
printf("Response Status Code = %d\n",respStatusCode);
if (respStatusCode != 204) {
printf("Response Header:\n");
printf("%s\n",CkHttpResponse_header(resp));
printf("Response Body:\n");
printf("%s\n",CkHttpResponse_bodyStr(resp));
printf("Failed.\n");
CkHttpResponse_Dispose(resp);
CkHttp_Dispose(http);
return;
}
CkHttpResponse_Dispose(resp);
printf("Success.\n");
CkHttp_Dispose(http);
}
Curl Command
curl -X DELETE
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Endpoint/{endpoint_id}/
Postman Collection Item JSON
{
"name": "Delete an Endpoint",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Endpoint/{endpoint_id}/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Endpoint",
"{endpoint_id}",
""
]
},
"description": "Permanently delete an endpoint.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/endpoint#delete-an-endpoint)"
},
"response": [
{
"name": "Delete an Endpoint",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Endpoint/{endpoint_id}/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Endpoint",
"{endpoint_id}",
""
]
}
},
"code": 204,
"_postman_previewlanguage": "Text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}