aktuell beschäftige ich mich mit der HTTPClient Klasse. Diese verwende ich auf meiner "Serveranwendung" die immer mal wieder folgenden Code ausführt:
Code: Alles auswählen
LOCAL cResult := ""
LOCAL oHTTP
LOCAL oJsonResult
LOCAL sHTTPResponse := ""
/*
oHTTP := HttpClient():new( REQUEST_URL )
oHTTP:httpRequest:setHeader("Content-Type", "application/json; charset=utf-8")
oHTTP:httpRequest:setMethod( "POST" )
oHTTP:httpRequest:setContent( json_serialize(oData) )
oHTTP:setAuthorization( ::URLUsername,::URLPassword )
IF P_PORTA2_Aktiv = "1"
sHTTPResponse := oHTTP:send()
IF oHTTP:getStatusCode() == 200
FileWrite(cLocalDataPath + "soapResponse.txt", sHTTPResponse)
cResult := MemoRead(cLocalDataPath + "soapResponse.txt")
ENDIF
oHTTP:disconnect()
ENDIF
*/
Führe ich diesen Quelltext in meiner Testumgebung aus, habe ich keinerlei Probleme.
Hat jemand ähnliche Probleme bereits gehabt?
Liebe Grüße aus Hanau !