Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds optional $config parameter to API instance constructor #51

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vedmaka
Copy link

@vedmaka vedmaka commented Nov 20, 2022

The change adds optional $config parameter to MediaWiki instance constructor. With the optional $config param it's not possible to supply internal Guzzle client with extra parameters [1] like timeout and connect_timeout.

Additionally there is a special noretry flag added to be processed by MiddlewareFactory to allow to disable 5x retries which are enabled by default.

For example:

$api = MediaWiki::newFromEndpoint( 'https://mywiki.com', null, [
    'timeout' => 60,
    'connect_timeout' => 30,
    'noretry' => true
] );

@vedmaka vedmaka marked this pull request as ready for review November 20, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant