PowerBuilder
PowerBuilder
Example: Http.DownloadHash method
Demonstrates theDownloadHash method.
Chilkat PowerBuilder Downloads
integer li_rc
oleobject loo_Http
string ls_Url
string ls_EncodedHash
loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
ls_Url = "https://chilkatdownload.com/11.1.0/chilkat2-python-3.13-x64.zip"
ls_EncodedHash = loo_Http.DownloadHash(ls_Url,"sha256","hex_lower")
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
return
end if
// Expected value: 32583182374888c7761e7c15b998fd1d326c439c704d59380d34599f4be9b63a
Write-Debug "sha256 = " + ls_EncodedHash
destroy loo_Http