Sorry if this is really simple but I am new to REST requests. I am trying to make a GET request to a REST API I have been provided with but I am getting a 415 error (Unsupported Media Type).
Here is my (very basic) code :
<?php
header('Content-Type: application/json;charset=utf-8;');
$url = "https://opsview.somedomain.net/rest";
$response = file_get_contents($url);
echo $response;
?>
The API I am connected to says it supports json or xml so not sure why I am getting this error? Any ideas?
Any help will be much appreciated.