Sending HTTP request from Indicator does not work

Created at 03 Aug 2022, 09:34
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FR

frantisek-fanda

Joined 03.08.2022

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


@frantisek-fanda