Delphi DLL Requires Chilkat v11.0.0+
Delphi DLL
Transition from Http.QuickPutStr to Http.HttpNoBody
Provides instructions for replacing deprecated QuickPutStr method calls with HttpNoBody.Chilkat Delphi DLL Downloads
var
success: Boolean;
http: HCkHttp;
url: PWideChar;
responseBody: PWideChar;
responseOut: HCkHttpResponse;
begin
success := False;
http := CkHttp_Create();
// ...
// ...
url := 'https://example.com/test';
// ------------------------------------------------------------------------
// The QuickPutStr method is deprecated:
responseBody := CkHttp__quickPutStr(http,url);
if (CkHttp_getLastMethodSuccess(http) = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using HttpNoBody.
// Your application creates a new, empty HttpResponse object which is passed
// in the last argument and filled upon success.
responseOut := CkHttpResponse_Create();
success := CkHttp_HttpNoBody(http,'PUT',url,responseOut);
if (success = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
responseBody := CkHttpResponse__bodyStr(responseOut);
CkHttp_Dispose(http);
CkHttpResponse_Dispose(responseOut);