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
$client = new Client();
$client->addCache(new CacheItemPool(/* some psr cache implementation */));
$client->setOption('api_version', 'custom-version-goes-here');
// then just authentication, and that's it
Activity
Nyholm commentedon Jul 30, 2016
Are you also using setEnterpriseUrl?
What API are you using?
GrahamCampbell commentedon Jul 30, 2016
The code is essentially this:
GrahamCampbell commentedon Jul 30, 2016
All this stuff was working before the psr6 stuff came in.
GrahamCampbell commentedon Jul 30, 2016
Basically, it's https://github.com/GrahamCampbell/Laravel-GitHub/tree/master/src.
GrahamCampbell commentedon Jul 31, 2016
Calling
$client->clearHeaders();after fixed it.Nyholm commentedon Jul 31, 2016
Interesting. I'll try to debug this tonight.
GrahamCampbell commentedon Jul 31, 2016
I guess it's pretty clear why it's happening, right. The setOptions method doesn't mark the headers as old?
Nyholm commentedon Jul 31, 2016
Fact is, the Accept header was not set at all until you call
clearHeaders. Please try the patch in PR #415 to see if it works.