Exemple #1
0
 public static HttpReceiver GetReceiver()
 {
     if (Instance == null)
     {
         Instance = new HttpReceiver();
     }
     return(Instance);
 }
        public override HttpResponseMessage Execute()
        {
            var credentialsJson = JsonConvert.SerializeObject(credentials);
            var httpClient      = HttpReceiver.GetReceiver();

            var res = httpClient.PostJson(endpoint, credentialsJson);

            return(res);
        }
Exemple #3
0
        private void GenerateToken()
        {
            var credentialsss = new Credentials
            {
                Username = "******",
                Password = "******",
            };
            AuthenticationCommand command = new AuthenticationCommand(credentialsss);
            var auth  = InternalExecute(command);
            var token = JsonConvert.DeserializeObject <Token>(auth);

            HttpReceiver.GetReceiver().SetToken(token.Id_Token);
        }
Exemple #4
0
        public override HttpResponseMessage Execute()
        {
            var reciever = HttpReceiver.GetReceiver();

            return(reciever.Get(endpoint));
        }