title: HTTPWebRequest GET error The remote server returned an error: (415) Unsupported Media Type
body: <p>This code is supposed to give me JsonString in response.But I am getting an error</p>
  
  <p>An unhandled exception of type 'System.Net.WebException' occurred in System.dll</p>
  
  <p>Additional information: The remote server returned an error: (415) Unsupported Media Type.</p>
  
  <pre><code>string  Url = "https://abc.test.xyz.com/123456344589753/transactions";
              HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
              string certThumbPrint = "ce03c469fb6c6dewwwww21886b7c1d405d954hshgd";
              X509Certificate2 cert = FindCertificateByThumbprint(certThumbPrint);
              if (cert != null)
              {
                  request.ClientCertificates.Add(cert);
              }
              request.Method = "GET";
              request.MediaType = "application/json";
              request.ContentType = "application/json; charset=utf-8";
              string text;
              var response = (HttpWebResponse)request.GetResponse();
              using (var sr = new StreamReader(response.GetResponseStream()))
              {
                  text = sr.ReadToEnd();
              }
  </code></pre>
  
  <p>Any suggestions to resolve this error</p>