Answers for "how to send token by header in guzzle"

PHP
2

guzzle bearer token

$newresponse = $basicauth->request(
    'GET',
    'api/1/curriculum',
    ['debug'   => true], 
    ['headers' => 
        [
            'Authorization' => "Bearer {$acceso->access_token}"
        ]
    ]
)->getBody()->getContents();
Posted by: Guest on May-05-2020
0

guzzlehttp php basic auth

$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://api.github.com/user', [
    'auth' => ['user', 'pass']
]);
Posted by: Guest on September-30-2020

Code answers related to "how to send token by header in guzzle"

Browse Popular Code Answers by Language