Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Unicode C) Shopify Delete ProductDelete a product from the shop.
#include <C_CkRestW.h> #include <C_CkStringBuilderW.h> void ChilkatSample(void) { HCkRestW rest; BOOL success; HCkStringBuilderW sbResponse; rest = CkRestW_Create(); CkRestW_SetAuthBasic(rest,L"SHOPIFY_PRIVATE_API_KEY",L"SHOPIFY_PRIVATE_API_SECRET_KEY"); success = CkRestW_Connect(rest,L"chilkat.myshopify.com",443,TRUE,TRUE); if (success != TRUE) { wprintf(L"%s\n",CkRestW_lastErrorText(rest)); CkRestW_Dispose(rest); return; } sbResponse = CkStringBuilderW_Create(); success = CkRestW_FullRequestNoBodySb(rest,L"DELETE",L"/admin/products/#{id}.json",sbResponse); if (success != TRUE) { wprintf(L"%s\n",CkRestW_lastErrorText(rest)); CkRestW_Dispose(rest); CkStringBuilderW_Dispose(sbResponse); return; } if (CkRestW_getResponseStatusCode(rest) != 200) { wprintf(L"Received error response code: %d\n",CkRestW_getResponseStatusCode(rest)); wprintf(L"Response body:\n"); wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponse)); CkRestW_Dispose(rest); CkStringBuilderW_Dispose(sbResponse); return; } wprintf(L"Example Completed.\n"); CkRestW_Dispose(rest); CkStringBuilderW_Dispose(sbResponse); } |
© 2000-2023 Chilkat Software, Inc. All Rights Reserved.