Skip to content

RTKQuery Interceptors. How can I change method of the baseQuery to make POST the request with refresh token to update access token, instead of GET one. Solution below didn't help me. #4077

Closed Answered by phryneas
Belt0M asked this question in Q&A
Discussion options

You must be logged in to vote
baseQuery(
  {
    url: "/auth/refresh_token",
    method: "POST",
    body: JSON.stringify({ refresh_token: refreshToken }),
  },
  api,
  extraOptions
);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@toronado93
Comment options

Answer selected by Belt0M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants