Skip to content

Setting the api_version broken on master #411

Closed

Description

@GrahamCampbell
No description provided.

Activity

  1. Nyholm commented on Jul 30, 2016

    @Nyholm
    Collaborator

    Are you also using setEnterpriseUrl?

    What API are you using?

  2. GrahamCampbell commented on Jul 30, 2016

    @GrahamCampbell
    ContributorAuthor

    The code is essentially this:

    $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
    
  3. GrahamCampbell commented on Jul 30, 2016

    @GrahamCampbell
    ContributorAuthor

    All this stuff was working before the psr6 stuff came in.

  4. GrahamCampbell commented on Jul 30, 2016

    @GrahamCampbell
    ContributorAuthor
  5. GrahamCampbell commented on Jul 31, 2016

    @GrahamCampbell
    ContributorAuthor

    Calling $client->clearHeaders(); after fixed it.

  6. Nyholm commented on Jul 31, 2016

    @Nyholm
    Collaborator

    Interesting. I'll try to debug this tonight.

  7. GrahamCampbell commented on Jul 31, 2016

    @GrahamCampbell
    ContributorAuthor

    I guess it's pretty clear why it's happening, right. The setOptions method doesn't mark the headers as old?

  8. Nyholm commented on Jul 31, 2016

    @Nyholm
    Collaborator

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions