Skip to content

Accessing the full url inside an endpoint #2834

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

You must be logged in to vote

That's unfortunately impossible since baseUrl is an implementation detail of fetchBaseQuery, so it's not available outside of that.

This could be more possible in prepareHeaders, but I think you won't be able to access the url there as well. If not that, you'd have to provide your own fetchFn, I'm sorry.

Replies: 1 comment 1 reply

Comment options

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

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