Chilkat HOME Android™ Classic ASP C C++ C# Mono C# .NET Core C# C# UWP/WinRT DataFlex Delphi ActiveX Delphi DLL Visual FoxPro Java Lianja MFC Objective-C Perl PHP ActiveX PHP Extension PowerBuilder PowerShell PureBasic CkPython Chilkat2-Python Ruby SQL Server Swift 2 Swift 3/4 Tcl Unicode C Unicode C++ Visual Basic 6.0 VB.NET VB.NET UWP/WinRT VBScript Xojo Plugin Node.js Excel Go
(PureBasic) S3 Download String ObjectDemonstrates how to download a text file (i.e. object) from the Amazon S3 service directly into an in-memory string variable.
IncludeFile "CkHttp.pb" Procedure ChilkatExample() ; This example assumes the Chilkat API to have been previously unlocked. ; See Global Unlock Sample for sample code. http.i = CkHttp::ckCreate() If http.i = 0 Debug "Failed to create object." ProcedureReturn EndIf ; Insert your access key here: CkHttp::setCkAwsAccessKey(http, "ABQXXABC83ABCDEFVQXX") ; Insert your secret key here: CkHttp::setCkAwsSecretKey(http, "XXXXYYYYabcdABCD12345678xxxxyyyyzzzz") bucketName.s = "chilkattestbucket" objectName.s = "contacts.xml" charset.s = "utf-8" fileContents.s fileContents = CkHttp::ckS3_DownloadString(http,bucketName,objectName,charset) If CkHttp::ckLastMethodSuccess(http) <> 1 ; Failed Debug CkHttp::ckLastErrorText(http) Else ; Success Debug fileContents EndIf CkHttp::ckDispose(http) ProcedureReturn EndProcedure |
© 2000-2019 Chilkat Software, Inc. All Rights Reserved.