|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (Delphi DLL) Shopware Digest AuthenticationSee more Shopware ExamplesDemonstrates using Digest access authentication for Shopware.For more information, see https://developers.shopware.com/developers-guide/rest-api/#digest-access-authentication 
 uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Http, StringBuilder, JsonObject; ... procedure TForm1.Button1Click(Sender: TObject); var http: HCkHttp; sbResponseBody: HCkStringBuilder; success: Boolean; jResp: HCkJsonObject; begin // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. http := CkHttp_Create(); // To use HTTP Digest Authentication, set the login and password, and also indicate that DigestAuth should be used. CkHttp_putLogin(http,'api_username'); CkHttp_putPassword(http,'api_key'); CkHttp_putDigestAuth(http,True); sbResponseBody := CkStringBuilder_Create(); success := CkHttp_QuickGetSb(http,'https://my-shopware-shop.com/api/articles?limit=2',sbResponseBody); if (success = False) then begin Memo1.Lines.Add(CkHttp__lastErrorText(http)); Exit; end; jResp := CkJsonObject_Create(); CkJsonObject_LoadSb(jResp,sbResponseBody); CkJsonObject_putEmitCompact(jResp,False); Memo1.Lines.Add('Response Body:'); Memo1.Lines.Add(CkJsonObject__emit(jResp)); CkHttp_Dispose(http); CkStringBuilder_Dispose(sbResponseBody); CkJsonObject_Dispose(jResp); end; | ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.