HTTPRequest wait

Just starting out? Need help? Post your questions and find answers here.
Efo74
Posts: 16
Joined: Sat Mar 24, 2018 9:58 am

HTTPRequest wait

Post by Efo74 »

Hi, I have a problem with handling "HTTPRequest" requests.
I'll explain:
For example: what I would like to do is run a php script that returns a variable to me, after reading the variable, I want to open a window, which contains a text control with the value of the previously read variable.

If I open the form inside the HTTPRequest callback function ... like this:

Callback function for httprequest:

If Success
Debug Result$
frm_Example(Result$)
Else
Debug "HTTPRequest(): Error"
EndIf
EndProcedure


It works perfectly, but I wouldn't want to do it in this way.

I want make it in this way:

1) HTTPRequest ....

2) Wait for Request complete

3) frm_Example(Var$)

How Can I make a function that wait for HTTPRequest terminate ?

Is Possible ?
Thank you for the support.