Webrequest() to Connect to custom REST API
You may study the documentation.
Server port is automatically selected on the basis of the specified protocol - 80 for "http://" and 443 for "https://".
- www.mql5.com
Hey @Yashar Seyyedin have you had any problems with the "Connection: keep-alive" header parameter overwrite by the WebRequest() function?
My issue is that I am calling an AWS API gateway resource and the IP addresses constantly keep changing. Because of the Connection: keep-alive the WebRequest() call eventually ends up on a different server.
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