diff --git a/docs/rtk-query/usage/customizing-queries.mdx b/docs/rtk-query/usage/customizing-queries.mdx index 31f80fbb5b..47b9cc25e0 100644 --- a/docs/rtk-query/usage/customizing-queries.mdx +++ b/docs/rtk-query/usage/customizing-queries.mdx @@ -369,16 +369,17 @@ const axiosBaseQuery = method: AxiosRequestConfig['method'] data?: AxiosRequestConfig['data'] params?: AxiosRequestConfig['params'] + headers?: AxiosRequestConfig['headers'] }, unknown, unknown > => - async ({ url, method, data, params }) => { + async ({ url, method, data, params, headers }) => { try { - const result = await axios({ url: baseUrl + url, method, data, params }) + const result = await axios({ url: baseUrl + url, method, data, params, headers }) return { data: result.data } } catch (axiosError) { - let err = axiosError as AxiosError + const err = axiosError as AxiosError return { error: { status: err.response?.status,