Closed navyad closed 3 years ago
This is expected. You need to handle follow redirect for the 301 using the {"Location", "https://yts.mx/api/v2/list_movies.json?query_term=tt11296058"}
response header.
Browser does this for you
@sreecodeslayer Thanks, It worked.
HTTPoison.get(url, [], follow_redirect: true)
There is a public API that perfectly works in the browser and returns the JSON response but using the latest version of Httpoision It does not work as expected:
HTTP (GET) : https://yts.lt/api/v2/list_movies.json?query_term=tt11296058
Also to point out the status_code is coming from the response is
301
. 301 is for a resource that is permanently removed, but it seems that is not the case here.