Optional
adapterOptional
allowOptional
authOptional
baseOptional
beforeOptional
cancelOptional
dataOptional
decompressOptional
disableWhether to disable request abortion.
By default, all requests are abortable. Set this to true
to explicitly disable this behavior.
Optional
disableWhether 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.
Optional
disableWhether to disable automatic retries entirely. If set to true
, no retries will be attempted
for any type of failure.
See also disableRetryAPI.
Optional
disableWhether 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.
Optional
disableA 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.
Optional
envOptional
familyOptional
fetchOptional
formOptional
headersOptional
httpOptional
httpsOptional
insecureOptional
jarOptional
lookupOptional
maxOptional
maxOptional
maxThe 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.
Optional
maxOptional
maxOptional
methodOptional
onOptional
onOptional
paramsOptional
paramsOptional
proxyOptional
responseOptional
responseOptional
signalOptional
socketOptional
timeoutOptional
timeoutOptional
transformOptional
transformOptional
transitionalOptional
transportOptional
urlOptional
validateOptional
withOptional
withOptional
xsrfOptional
xsrf
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
userRequestOptions
is the options set by the user with the constructor or thesetRequestOptions
method. Higher-priority options override lower ones if they share the same properties.