You may study the documentation.
Server port is automatically selected on the basis of the specified protocol - 80 for "http://" and 443 for "https://".
Documentation on MQL5: Network Functions / WebRequest
- www.mql5.com
The function sends an HTTP request to a specified server. The function has two versions: 1. Sending simple requests of type "key=value...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello dev. I wanted to make a bot that interacts with an API i built . Only issue is that WebRequest keeps returning -1. Whet i run the same code in mt5 it is able to GET data from the API. I have googled and rummaged through other peoples code to no avail. I am guessing the issue is in the code of mt4 because of the response being -1. Meaning it was unable to send a request to my API . Please assist if you can figure out where am going wrong.
Here is the code. I have changed the headers multiple times to immitate browser headers and even left it as NULL but still no response