here the code
Function http_get_to_string_with_retry1() as Object
Pvar=privatevariables()
timeout% = 1500
num_retries% = 5
resHeaders = CreateObject("roAssociativeArray")
resArray = CreateObject("roArray", 5, false)
while num_retries% >
if (m.Http.AsyncPostFromString("Here you can post your string"))
event = wait(timeout%, m.Http.GetPort())
if type(event) = "roUrlEvent"
'print "***";event.GetInt();"***";event.GetResponseCode();"***";event.GetFailureReason();"***";event.GetSourceIdentity()
resArray.push(event.GetString())
resArray.push(event.GetResponseHeadersArray())
exit while
elseif event = invalid
m.Http.AsyncCancel()
REM reset the connection on timeouts
print"m.Http.GetUrl()",m.Http.GetUrl()
m.Http = CreateURLTransferObject(m.Http.GetUrl())
timeout% = 2 * timeout%
else
print "roUrlTransfer::AsyncGetToString(): unknown event"
endif
endif
num_retries% = num_retries% - 1
end while
return resArray[0]
End Function