Sending HTTP request from Indicator does not work
Sending HTTP request from Indicator does not work
03 Aug 2022, 09:34
Hi,
I am trying to send POST request with INdicator in cTrader, unfortunatelly it does not work, but I don't know why.
Code is ok, there is not any error in Journal or Log, but the external website just don't receive any request. Could anyone push me to the right direction to solve this problem? Thank you.
My code is in Calculate(), after some conditions are met, this code is invoked:
var endpoint = "https://asdasdasdasdasdasdasd.requestcatcher.com/";
var client = new HttpClient();
client.PostAsync(endpoint, new StringContent("{'test':'test'}", Encoding.UTF8, "application/json"));
I am using requestcatcher which is solid working website for testing sending requests. It is working when I send request manually from browser or from python, php etc ...
Thank you