-
Good afternoon. When I try to run this code it throws an error: <?php
//CheckRequest.php
use Saloon\Http\SoloRequest;
use Saloon\Enums\Method;
class CheckRequest extends SoloRequest
{
protected Method $method = Method::GET;
public function resolveEndpoint(): string
{
return 'https://pokeapi.co/api/v2/pokemon';
}
} <?php
// index.php
require './vendor/autoload.php';
require './check/CheckRequest.php';
$request = new CheckRequest;
$response = $request->send();
echo '<pre>';
print_r($response);
echo '</pre>'; |
Beta Was this translation helpful? Give feedback.
Answered by
AerKov
Jul 28, 2023
Replies: 1 comment 1 reply
-
Hey @AerKov! What version of Saloon are you currently using? This was a previous issue but was fixed in v2.6.4 and also had a related issue here: How does Saloon’s version look in your composer.json file? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot. Didn't notice right away. It worked!!! Changed the version to 2.6.4 in composer.json and made the
composer update