Update composer.json#5
Conversation
Added needed dependency
Added the parameter HTTPOptions to configure the GuzzleClient. Fixed the error handling to report better errors, when there is no response to the request.
|
I added a way to prevent GuzzleClient to check SSL verification, because I had to access an API that had no valid SSL anymore (the API wil be closed soon - Contao will replace it, so renewing the cert does not make sense anymore) |
Defcon0
left a comment
There was a problem hiding this comment.
Thanks for your efforts. I guess after these changes we have it ;-)
| $options['verify'] = false; | ||
| } | ||
|
|
||
| $event = $this->eventDispatcher->dispatch(BeforeAuthenticationEvent::NAME, new BeforeAuthenticationEvent($auth, $this->sourceModel)); |
There was a problem hiding this comment.
Could you please replace auth by options and fix the getter and setter; Afterwards please pass $event->getOptions() to storeValueToRemoteCache() and getContentFromUrl(). Then I guess we have it :-) Thanks for your support!
There was a problem hiding this comment.
Could you please rename the event to ModifySourceHttpClientOptionsEvent since this makes more sense. This way we can modify all options of guzzle and not only auth settings.
| } | ||
|
|
||
| protected function getContentFromUrl(string $method, string $url, array $auth = [], array $HTTPClientOptions = []): array | ||
| protected function getContentFromUrl(string $method, string $url, array $options = []): array |
There was a problem hiding this comment.
Please rename $options to $httpClientOptions since we might have a general $options array sometimes. (same below)
Added needed dependency
Since the Client is used in src/Source/AbstractSource.php as a Client this should be a prod dependency.