httprequest example (or how to get data out of a callback)
Posted: Fri Feb 06, 2015 2:57 pm
This is probably going to be very newby like, but I just cannot figure it out: I'm trying to use the httprequest example
If want to use result$ after the httprequest. I can see that result$ has a value (the corrrect value) but I cannot get it exported somehow out of the procedure. A does not have any effect...
It should be possible, but how?
Code: Select all
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
Debug Result$
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure
; Get the content of this file, and display it in the debug window
;
HTTPRequest(#PB_HTTP_Get, #PB_Compiler_Filename, "", @HttpGetEvent())
Code: Select all
ProcedureReturn result$
It should be possible, but how?