You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like Issue #507 , working with the code-search, i want to change my accept header to the text-match header application/vnd.github.v3.text-match+json
Following along from the example in 507, my code:
// CONNECT TO API AND AUTHENTICATE SELF
$builder = new Github\HttpClient\Builder(new GuzzleClient());
$client = new \Github\Client($builder, 'application/vnd.github.v3.text-match+json');
$client->authenticate($user, $pwd, Github\Client::AUTH_HTTP_PASSWORD);
But, i'm greeted with: Fatal error: Uncaught Error: Class 'GuzzleClient' not found
So, what's wrong here?
Funny, i was just about to post that i got my text-match to show but there was an issue with the builder, the use Http\Adapter\Guzzle6\Client as GuzzleClient has fixed it completely!
Activity
acrobat commentedon Feb 16, 2018
GuzzleClientis not an existing class but as alias. Add this to your codeuse Http\Adapter\Guzzle6\Client as GuzzleClient;We should also update the docs so the correct example code is used.
Moon-Hub commentedon Feb 16, 2018
Funny, i was just about to post that i got my text-match to show but there was an issue with the builder, the
use Http\Adapter\Guzzle6\Client as GuzzleClienthas fixed it completely!acrobat commentedon Feb 16, 2018
I've fixed the docs in #679