Classic ASP
Classic ASP
Transition from Http.PostBinary to Http.HttpBinary
Provides instructions for replacing deprecated PostBinary method calls with HttpBinary.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
set http = Server.CreateObject("Chilkat.Http")
verb = "POST"
url = "https://example.com/"
contentType = "application/octet-stream"
' ------------------------------------------------------------------------
' The PostBinary method is deprecated:
responseBody = http.PostBinary(url,byteData,contentType,0,0)
If (http.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
Response.End
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using HttpBinary.
set responseOut = Server.CreateObject("Chilkat.HttpResponse")
success = http.HttpBinary(verb,url,byteData,contentType,responseOut)
If (success = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
Response.End
End If
responseBody = responseOut.BodyStr
%>
</body>
</html>