dialogflow icon indicating copy to clipboard operation
dialogflow copied to clipboard

Fix/pass authorization headers

Open ctrlaltdylan opened this issue 7 years ago • 0 comments

This is a pretty major change and if you're against it I totally understand.

  1. This passes the Dialogflow Client Access Token to the GuzzleHttpClient's constructor as a headers entry so it's available on all requests
  2. This adds Codeception as a testing suite with a rudimentary test for testing the integration for a basic query
  3. This bypasses the internal Dialogflow\HttpClient\GuzzleHttpClient and just instantiates one in the DialogFlow\Client instead. In a perfect world, instantiation would be in a Factory or through a simple container, but I don't like to complicate if it's not necessary.
  4. Updates the README to include the missing sessionId that needs passed as an argument to the query

Let me know your thoughts, if it's too drastic of a change that's alright I'll just maintain my fork.

ctrlaltdylan avatar Aug 26 '18 16:08 ctrlaltdylan