OptionaladapterOptionalallowOptionalauthOptionalbaseOptionalbeforeOptionalcancelOptionaldataOptionaldecompressOptionaldisableWhether to disable request abortion.
By default, all requests are abortable. Set this to true to explicitly disable this behavior.
OptionaldisableWhether to disable automatic injection of the { assert: 'user' } parameter.
By default, mwbot-ts automatically adds this parameter if:
assert nor assertuser field.Set this option to true to disable this automatic injection.
OptionaldisableWhether to disable automatic retries entirely. If set to true, no retries will be attempted
for any type of failure.
See also disableRetryAPI.
OptionaldisableWhether to disable automatic retries for API-related errors. If set to true, retries will not
be attempted for errors returned by the API itself.
HTTP-related errors (e.g., Request timeout (408)) will still be retried.
OptionaldisableA list of error codes for which automatic retries should be disabled.
If a request fails due to one of these error codes, it will not be retried.
OptionalenvOptionalfamilyOptionalfetchOptionalformOptionalheadersOptionalhttpOptionalhttpsOptionalinsecureOptionaljarOptionallookupOptionalmaxOptionalmaxOptionalmaxThe maximum allowed server lag (in seconds) before aborting retries when a 'maxlag' API error
is encountered.
If the reported lag exceeds this threshold, the request will not be retried, and the 'maxlag'
error will be thrown immediately.
By default, mwbot-ts handles 'maxlag' errors with the following delay mechanism before
attempting a retry:
Retry-After header, its value (in seconds) determines the delay.Retry-After is missing or invalid, a default delay of 5 seconds applies.maxLagLimit, no retry is performed, and the error is thrown immediately.If omitted, the default maxLagLimit is 60 seconds.
OptionalmaxOptionalmaxOptionalmethodOptionalonOptionalonOptionalparamsOptionalparamsOptionalproxyOptionalresponseOptionalresponseOptionalsignalOptionalsocketOptionaltimeoutOptionaltimeoutOptionaltransformOptionaltransformOptionaltransitionalOptionaltransportOptionalurlOptionalvalidateOptionalwithOptionalwithOptionalxsrfOptionalxsrf
Configuration options for Mwbot's request methods, extending Axios's request config.
These options are per-request options and should be passed to request methods as needed. To set default options for all requests, provide them in the Mwbot.constructor or update them with Mwbot.setRequestOptions.
When passed to a request method, these options are recursively merged with default options. The priority order is:
where
userRequestOptionsis the options set by the user with the constructor or thesetRequestOptionsmethod. Higher-priority options override lower ones if they share the same properties.