title: 415 Unsupported Media Type HTTP
body: <p>I'm trying to send a GET request to Cisco ISE, but get this error:</p>
  
  <blockquote>
    <p>415 Unsupported Media Typen</p>
  </blockquote>
  
  <p>What am I doing wrong? The API documentation says:</p>
  
  <blockquote>
    <p>Method: GET</p>
    
    <p>URI: <a href="https://10.10.10.10:9060/ers/config/networkdevice/" rel="nofollow noreferrer">https://10.10.10.10:9060/ers/config/networkdevice/</a></p>
    
    <p>HTTP 'Accept' header:application/vnd.com.cisco.ise.network.networkdevice.1.0+xml</p>
  </blockquote>
  
  <p>So, I should be able to receive data as XML.</p>
  
  <p>I've already tried to do this:</p>
  
  <pre><code>$header-&gt;header(
      'Content-Type'=&gt;'application/vnd.com.cisco.ise.network.networkdevice.xml');
  $header-&gt;header(
      'Content-Type'=&gt;'application/vnd.com.cisco.ise.network.networkdevice.1.0+xml');
  </code></pre>
  
  <p>Nothing works.. every time I get the above error.</p>
  
  <p>Here's my full code.</p>
  
  <pre><code>use strict;
  use warnings;
  use JSON -support_by_pp;
  use LWP 5.64;
  use LWP::UserAgent;
  use MIME::Base64;
  use REST::Client;
  use IO::Socket::SSL;
  use HTTP::Headers;
  
  #So dass es auch ohne SSL Sertifizierung funktioniert
  BEGIN { $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0 }
  #Create a user agent object
  my $ua = LWP::UserAgent-&gt;new(ssl_opts=&gt; {
  SSL_verify_mode =&gt; SSL_VERIFY_NONE(),
  verify_hostname =&gt; 0,
                                                }
                                          );
  
  #Create a request
  my $uri='https://10.10.10.10:9060/ers/config/networkdevice';
  my $header = HTTP::Headers-&gt;new;
  $header-&gt;header('Content-Type'=&gt;'application/vnd.com.cisco.ise.network.networkdevice');
  my $req = HTTP::Request-&gt;new('GET', $uri, $header);
  $req-&gt; authorization_basic("user", "user");
  
  #Pass request to the user agent and get a response back
  my $res = $ua-&gt;request($req);
  
  #Check the outcome of the response
  if ($res-&gt;is_success) {
    print $res-&gt;content;
  } else {
     print $res-&gt;status_line, "n";
  }
  </code></pre>