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); }
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); }
public override HttpResponseMessage Execute() { var reciever = HttpReceiver.GetReceiver(); return(reciever.Get(endpoint)); }