|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (C) S3 Delete FileDemonstrates how to delete a remote file (object) on the Amazon S3 service. 
 #include <C_CkHttp.h> void ChilkatSample(void) { HCkHttp http; const char *bucketName; const char *objectName; BOOL success; // This example assumes the Chilkat HTTP API to have been previously unlocked // See Global Unlock Sample for sample code http = CkHttp_Create(); // Insert your access key here CkHttp_putAwsAccessKey(http,"AWS_ACCESS_KEY"); // Insert your secret key here CkHttp_putAwsSecretKey(http,"AWS_SECRET_KEY"); bucketName = "chilkattest"; objectName = "starfish.jpg"; CkHttp_putKeepResponseBody(http,TRUE); success = CkHttp_S3_DeleteObject(http,bucketName,objectName); if (success != TRUE) { printf("%s\n",CkHttp_lastErrorText(http)); CkHttp_Dispose(http); return; } if (CkHttp_getLastStatus(http) != 204) { printf("Status code = %d\n",CkHttp_getLastStatus(http)); printf("%s\n",CkHttp_lastResponseBody(http)); printf("Failed.\n"); CkHttp_Dispose(http); return; } // 204 is the success response status. // When successful, the response body will be empty. printf("Status code = %d\n",CkHttp_getLastStatus(http)); printf("Success. Object deleted.\n"); CkHttp_Dispose(http); } | ||||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.