Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

New HTTP requests for MQL4 (tested in version 600) - MetaTrader 4 Library

author EAcpu | 2 reads | 0 comments |

This is a simple MQL4 wrapper using Windows native wininet.dll . It allows you to send HTTP requests (currently only GET method is supported) to remote targets and read body responses from MQL compiled in version 600 and newer (non-strict mode).

For the latest releases, issue tracker, and contributions, see the project's Github repository .

 #include integer start() {

string myIP = httpGET( "http://icanhazip.com/" );

print ( "My machine's IP is" ,myIP);

return ( 0 );
}

The source code is released in the Github repository . Any contribution will be highly appreciated.

The library is based on the following high-quality resources:

- HTTP Wininet example: http://codebase.mql4.com/en/code/10644

- EasyXML parser: https://www.mql5.com/en/code/1998


Attachment download

📎 mq4-http.mqh (2.65 KB)

Source: MQL5 #11119

Verification code Refresh