I want to use football Api and I put this code :
<?php
require_once ‘unirest-php/src/Unirest.php’;
$headers = array(‘Accept’ => ‘application/json’);
response = Unirest\Request::POST("https://football6.p.rapidapi.com//leagues/season/",
array(
"X-RapidAPI-Host" => "football6.p.rapidapi.com",
"X-RapidAPI-Key" => "0287792a9fmsh4570c9cfad47977p1bd26bjsnb629f1df3bfc"
)
);
echo '<pre>';
echo print_r(response);
echo ‘</pre>’;
?>
but the response returned :
Unirest\Response Object
(
[code] => 404
[raw_body] => {“message”:“Endpoint/leagues/season/ does not exist”}
[body] => stdClass Object
(
[message] => Endpoint/leagues/season/ does not exist
)
[headers] => Array
(
[0] => HTTP/1.1 404 Not Found
[Content-Type] => application/json
[Date] => Thu, 25 Jul 2019 09:14:55 GMT
[Server] => RapidAPI-1.0.20
[X-RapidAPI-Proxy-Response] => true
[X-RapidAPI-Region] => AWS - eu-central-1
[X-RapidAPI-Version] => 1.0.20
[Content-Length] => 56
[Connection] => keep-alive
)
)
1
I make test with football api but now all seasons finished.
how do I take last seasons results to make test with football api?
Join in the discussion - add comment below: