dialogflow
dialogflow copied to clipboard
Fix/pass authorization headers
This is a pretty major change and if you're against it I totally understand.
- This passes the Dialogflow Client Access Token to the GuzzleHttpClient's constructor as a
headersentry so it's available on all requests - This adds Codeception as a testing suite with a rudimentary test for testing the integration for a basic query
- This bypasses the internal
Dialogflow\HttpClient\GuzzleHttpClientand just instantiates one in theDialogFlow\Clientinstead. 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. - Updates the README to include the missing
sessionIdthat 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.