samedi 7 janvier 2017

Laravel : How to get API ( Authenticate User) Data using Guzzle

I want to access some data from a laravel application which has authentication (Laravel Basic) . So when I tried to access the data, instead of getting the data it shows the user logging page. I used following code for accessing the other application data. Can anyone suggest what's the problem here?

public function getApiData()
                {
                  $client = new Client();              
                  $response =   $client->request('GET', 'http://ift.tt/2je9LbJ', ['auth' => ['test@yahoo.co', '123456']]);
                   dd($response->getBody()->getContents());             
                }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2i3ef7r
via IFTTT

Aucun commentaire:

Enregistrer un commentaire