Hello Erik,
I tried to use your code for consuming a RESTful webservice. The secong time I send the same Get request, the HTTPGetRequest returns 1 WITHOUT SENDING THE REQUEST.
My code calls Get Create U_cJSONWebClient to hClient only once and keeps the handle in a property. Do I have to call it for each request? (with a destroy afterwards.) EDIT: This did not help. I have to exit the program and start it again.
Code:
Function _DoGetRequest String sURL Handle hTransfer Returns Boolean
_tcWebClientUri Uri
Integer iStatus
Send _ClearDataReceived of (phTransfer(Self))
Get _URISegments sURL to Uri
Send _PrepareRequest Uri hTransfer
Get HTTPGetRequest of hTransfer (Uri.Path + Uri.Name + If(Uri.Query <> "", "?" + Uri.Query, "") + If(Uri.Hash <> "", "#" + Uri.Hash, "")) to iStatus // This line does not send the same request twice.
Function_Return (iStatus <> 0)
End_Function
/Lennart Thelander