PHP ActiveX Requires Chilkat v11.0.0+
PHP ActiveX
Transition from Http.QuickRequestParams to Http.HttpParams
Provides instructions for replacing deprecated QuickRequestParams method calls with HttpParams.Chilkat PHP ActiveX Downloads
<?php
$success = 0;
$http = new COM("Chilkat.Http");
$verb = 'GET';
$url = 'https://example.com/';
$json = new COM("Chilkat.JsonObject");
$json->UpdateInt('param1',100);
$json->UpdateString('param2','test');
// ------------------------------------------------------------------------
// The QuickRequestParams method is deprecated:
// responseObj is a Chilkat.HttpResponse
$responseObj = $http->QuickRequestParams($verb,$url,$json);
if ($http->LastMethodSuccess == 0) {
print $http->LastErrorText . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using HttpParams.
// Your application creates a new, empty HttpResponse object which is passed
// in the last argument and filled upon success.
$responseOut = new COM("Chilkat.HttpResponse");
$success = $http->HttpParams($verb,$url,$json,$responseOut);
if ($success == 0) {
print $http->LastErrorText . "\n";
exit;
}
?>