MetaTrader 4 MT4 Libraries “Native” MQL HTTP Client – library MetaTrader 4

“Native” MQL HTTP Client – library MetaTrader 4


gunzip <>


This library implements two simple HTTP GET / POST function to communicate with HTTP servers.

It doesn’t require any external dll(s) apart from the standard wininet shipped with win32.

Moreover it provides some file upload ability.

Put this in experts/include subfolder.


#include <ghttp.mqh>

string params[2][2];

params[0][0] = “key1”;

params[0][1] = “value1”;

params[1][0] = “key2”;

params[1][1] = “value2”;

// for multiple file upload

string filenames[2][2];

filenames[0][0] = “uploaded1”; // name of form field for file upload

filenames[0][1] = “test1.txt”; // file name in experts/files/ subfolder

filenames[1][0] = “uploaded2”;
filenames[1][1] = “test2.txt”;
string response;
HttpPOST(“”, “/upload.php”, params, filenames, response);
HttpGET(” response);



  • you _must_ pass two arrays for params and filenames. pass an empty two dimensional array if you have no files/params (ie. string params[][];)
  • files to upload MUST reside in experts/files subfolder
Alternative:   Kirshenbaum bands - indicator MetaTrader 5

📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks