/// <summary> /// Sends a GET request, Receives string response /// Overrides HttpRequestBase.Send() /// Warning: Not thread safe, particularly in Web-based UIs. This is a stopgap to allow legacy code to operate with blocking/deadlock risk. /// </summary> /// <returns></returns> public override string Send() { var returnValue = TypeExtension.DefaultString; var client = new HttpClientBuilder(); var data = new StringContent(DataToSend, System.Text.Encoding.UTF8, this.ContentType); Response = client.PostAsync(this.Url, data).Result; if (this.Response.IsSuccessStatusCode) { DataReceivedRaw = this.Response.Content.ReadAsStringAsync().Result; if (SendPlainText == false) { DataReceivedDecrypted = this.Encryptor.Decrypt(DataReceivedRaw); } else { DataReceivedDecrypted = DataReceivedRaw; } } return(DataReceivedDecrypted); }