Unicode C++
Unicode C++
Shopify Delete Product
See more Shopify Examples
Delete a product from the shop.Chilkat Unicode C++ Downloads
#include <CkRestW.h>
#include <CkStringBuilderW.h>
void ChilkatSample(void)
{
bool success = false;
CkRestW rest;
rest.SetAuthBasic(L"SHOPIFY_PRIVATE_API_KEY",L"SHOPIFY_PRIVATE_API_SECRET_KEY");
success = rest.Connect(L"chilkat.myshopify.com",443,true,true);
if (success != true) {
wprintf(L"%s\n",rest.lastErrorText());
return;
}
CkStringBuilderW sbResponse;
success = rest.FullRequestNoBodySb(L"DELETE",L"/admin/products/#{id}.json",sbResponse);
if (success != true) {
wprintf(L"%s\n",rest.lastErrorText());
return;
}
if (rest.get_ResponseStatusCode() != 200) {
wprintf(L"Received error response code: %d\n",rest.get_ResponseStatusCode());
wprintf(L"Response body:\n");
wprintf(L"%s\n",sbResponse.getAsString());
return;
}
wprintf(L"Example Completed.\n");
}