PureBasic
PureBasic
Example: Http.DownloadHash method
Demonstrates theDownloadHash method.
Chilkat PureBasic Downloads
IncludeFile "CkHttp.pb"
Procedure ChilkatExample()
http.i = CkHttp::ckCreate()
If http.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
url.s = "https://chilkatdownload.com/11.1.0/chilkat2-python-3.13-x64.zip"
encodedHash.s = CkHttp::ckDownloadHash(http,url,"sha256","hex_lower")
If CkHttp::ckLastMethodSuccess(http) = 0
Debug CkHttp::ckLastErrorText(http)
CkHttp::ckDispose(http)
ProcedureReturn
EndIf
; Expected value: 32583182374888c7761e7c15b998fd1d326c439c704d59380d34599f4be9b63a
Debug "sha256 = " + encodedHash
CkHttp::ckDispose(http)
ProcedureReturn
EndProcedure