Visual FoxPro
Visual FoxPro
Shopware Digest Authentication
See more Shopware Examples
Demonstrates using Digest access authentication for Shopware.Chilkat Visual FoxPro Downloads
LOCAL lnSuccess
LOCAL loHttp
LOCAL loSbResponseBody
LOCAL loJResp
lnSuccess = 0
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loHttp = CreateObject('Chilkat.Http')
* To use HTTP Digest Authentication, set the login and password, and also indicate that DigestAuth should be used.
loHttp.Login = "api_username"
loHttp.Password = "api_key"
loHttp.DigestAuth = 1
loSbResponseBody = CreateObject('Chilkat.StringBuilder')
lnSuccess = loHttp.QuickGetSb("https://my-shopware-shop.com/api/articles?limit=2",loSbResponseBody)
IF (lnSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loSbResponseBody
CANCEL
ENDIF
loJResp = CreateObject('Chilkat.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0
? "Response Body:"
? loJResp.Emit()
RELEASE loHttp
RELEASE loSbResponseBody
RELEASE loJResp