Guzzle returning a 404 on a valid URL -


i'm using guzzle curlauthplugin authenticate. when run code,

client error response\ [status code] 404\ [reason phrase] not found\ [url] https:\/\/api.buto.tv\/v2\/video\/tag\/v2\/video\/tag\/ 

the code i'm using is:

$client = new client(<url>);      // add auth plugin client object     $authplugin = new curlauthplugin(<apikey>, 'x');     $client->addsubscriber($authplugin);      $response = $client->get('v2/video/tag/')->send(); 

but url valid can paste in browser , works fine

i've tried:

 $client = new client('https://api.buto.tv');     $request = $client->get('v2/video/tag/');     $request->setauth('user', 'pass');     $response = $request->send(); 

but same error. have output url it's requesting echo $request->geturl(); , if copy , paste url in browser, url fine

i think may missing slash '/' after api.buto.tv, url resolving 'https://api.buto.tvv2/video/tag/' instead of 'https://api.buto.tv/v2/video/tag/'.

$client = new client('https://api.buto.tv/'); $request = $client->get('v2/video/tag/'); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -