Closed adnjoo closed 1 year ago
Status Code: 301 (Moved Permanently)
Response Headers:
it's redirecting the https request to a http link which Vercel/Vite doesn't allow
the problem was a trailing slash in the TV query
`discover/tv/?api_key=${tmdbKey}&include_adult=false&with_origin_country=US&language=en-US&page=${String(
page
)}`,
after
query: (page = 1) =>
`discover/tv?api_key=${tmdbKey}&include_adult=false&with_origin_country=US&language=en-US&page=${String(
page
)}`,
I guess the TMDB API thinks the request we send is not formatted properly, so it 301 redirects? or something like that..
Description
tv page not loading (redux toolkit query)
https://api.themoviedb.org/3/discover/tv?api_key=${tmdbKey}&include_adult=false&language=en-US&page=1&with_origin_country=US
chrome dev tools console tab
chrome dev tools network tab
but movies is ok
Investigation
axios was able to retrieve the results..