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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -