Download MetaTrader 5

Asynchronous Web Request

To add comments, please log in or register
Tinashe Chipomho
384
Tinashe Chipomho  

I would like to make some HTTP from an EA or even an indicator, the challenge is I want it to be asynchronous, the new WebRequest function is good but it is not asychronous and cannot be called from an indicator.

Is there a way to do this even using the Windows API, i just want to send a request don't wait for the response, and even if it comes don't care about it.

Alain Verleyen
Moderator
31969
Alain Verleyen  
Of course it's possible with WinAPI. Just do some researches (Codebase).
Ex Ovo Omnia
3263
Ex Ovo Omnia  
Tinashe Chipomho:

I would like to make some HTTP from an EA or even an indicator, the challenge is I want it to be asynchronous, the new WebRequest function is good but it is not asychronous and cannot be called from an indicator.

Is there a way to do this even using the Windows API, i just want to send a request don't wait for the response, and even if it comes don't care about it.

Basically you can send asynchronous http(s) request with a help of wininet, but you cannot use the callback function. Instead you have to check the return codes of the request periodically to detect if the response arrived (HttpQueryInfoW).
To add comments, please log in or register