title: One or more errors occurred. (Unable to parse TLS packet header) C# Xamarin Android Project Visual Studio
body: <p>When I using http url for API server I receive error:</p>
  <pre><code>    Message &quot;One or more errors occurred. (Cleartext HTTP traffic to 194.141.118.43 not permitted)&quot; 
  </code></pre>
  <p>When I put https on the url for API server I receive error:</p>
  <pre><code>    Message &quot;One or more errors occurred. (Unable to parse TLS packet header)&quot;  
  </code></pre>
  <p>My <code>RestServiceData</code> class look like:</p>
  <pre><code>    using System;
  using System.Diagnostics;
  using System.Net.Http;
  using System.Threading.Tasks;
  using MaritsaTundzhaForecast.Models;
  using Newtonsoft.Json;
  
  namespace MaritsaTundzhaForecast.Services
  {
      public class RestServiceData
      {
          HttpClient _client1;
  
          HttpClient _client2;
  
          public RestServiceData()
          {
              _client1 = new HttpClient();
  
              _client2 = new HttpClient();
          }
  
          public WaterBindingData GetWaterDataForecast(string query, string query2)
          {
              WaterDataJson waterData = new WaterDataJson();
              WaterStationsJson waterStations = new WaterStationsJson();
  
              WaterBindingData result = new WaterBindingData();
              try
              {
  
                  var task = Task.Run(() =&gt; _client1.GetAsync(query));
                  task.Wait();
                  var response = task.Result;
  
                  var task2 = Task.Run(() =&gt; _client2.GetAsync(query2));
                  task2.Wait();
                  var response2 = task2.Result;
  
  
                  if (response.IsSuccessStatusCode &amp;&amp; response2.IsSuccessStatusCode)
                  {
                      var content = response.Content.ReadAsStringAsync().Result;
                      var content2 = response2.Content.ReadAsStringAsync().Result;
  
                      var json = content2.Replace(&quot;\&quot;ardaforecast\&quot;:[[&quot;, &quot;\&quot;ardaforecast\&quot;:[ {\&quot;items\&quot;: [&quot;)
                                                   .Replace(&quot;}],{\&quot;fieldCount\&quot;&quot;, &quot;}],\&quot;details\&quot;:{\&quot;fieldCount\&quot;&quot;)
                                                   .Replace(&quot;}]}&quot;, &quot;}}]}&quot;);
                      waterData = JsonConvert.DeserializeObject&lt;WaterDataJson&gt;(content2);
  
  
                      waterStations = JsonConvert.DeserializeObject&lt;WaterStationsJson&gt;(content);
  
                      result.WaterData = waterData;
                      result.WaterStation = waterStations;
                  }
              }
              catch (Exception ex)
              {
                  Debug.WriteLine(&quot;\t\tERROR {0}&quot;, ex.Message);
              }
  
              return result;
          }
      }
  }
  </code></pre>
  <p>This is my <code>Constants</code> class:</p>
  <pre><code>    using System;
  using System.IO;
  
  namespace MaritsaTundzhaForecast
  {
      public static class Constants
      {
          public static string EndPoint = &quot;https://194.141.118.43:3001/&quot;;
      }
  }
  </code></pre>
  <p>What Can I do to fix this error ?</p>