/// <summary>
        /// Place REST POST call to the specified address with the specified DATA.
        /// </summary>
        /// <param name="address">Endpoint address</param>
        /// <param name="data">Data to send in body JSON encoded (optional)</param>
        /// <param name="headers">Optional headers to use</param>
        public bool Web(string address, object data = null, Dictionary <string, string> headers = null)
        {
            if (!Allow())
            {
                return(false);
            }

            var web = new NotificationWeb(address, data, headers);

            Messages.Enqueue(web);

            return(true);
        }
Exemple #2
0
        /// <summary>
        /// Place REST POST call to the specified address with the specified DATA.
        /// </summary>
        /// <param name="address">Endpoint address</param>
        /// <param name="data">Data to send in body JSON encoded (optional)</param>
        public bool Web(string address, object data = null)
        {
            if (!Allow())
            {
                return(false);
            }

            var web = new NotificationWeb(address, data);

            Messages.Enqueue(web);

            return(true);
        }
        /// <summary>
        /// Place REST POST call to the specified address with the specified DATA.
        /// </summary>
        /// <param name="address">Endpoint address</param>
        /// <param name="data">Data to send in body JSON encoded (optional)</param>
        public bool Web(string address, object data = null)
        {
            if (!_liveMode)
            {
                return(false);
            }
            var allow = Allow();

            if (allow)
            {
                var web = new NotificationWeb(address, data);
                Messages.Enqueue(web);
            }
            return(allow);
        }
Exemple #4
0
 /// <summary>
 /// Place REST POST call to the specified address with the specified DATA.
 /// </summary>
 /// <param name="address">Endpoint address</param>
 /// <param name="data">Data to send in body JSON encoded (optional)</param>
 public bool Web(string address, object data = null)
 {
     if (!_liveMode) return false;
     var allow = Allow();
     if (allow)
     {
         var web = new NotificationWeb(address, data);
         Messages.Enqueue(web);
     }
     return allow;
 }
Exemple #5
0
 /// <summary>
 /// Send a web REST request notification triggered during live trading from a user algorithm.
 /// </summary>
 /// <param name="notification"></param>
 public void Web(NotificationWeb notification)
 {
     //
 }