You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I request an API, this API will return 302, and automatically jump to another API, and then return data, but I see status code has been 200, I need to capture 302 to do some operations, what should I do?
thanks
The text was updated successfully, but these errors were encountered:
zystudios
changed the title
How can I catch 302?
How can I capture 302?
May 25, 2024
http.get('http://example.com/')// following redirects.redirects(0)// error handling.ok(res=>res.status>=200&&res.status<400).then(res=>{console.log(res.status)console.log(res.headers['location'])})
http.get('http://example.com/')// following redirects.redirects(0)// error handling.ok(res=>res.status>=200&&res.status<400).then(res=>{console.log(res.status)console.log(res.headers['location'])})
I request an API, this API will return 302, and automatically jump to another API, and then return data, but I see status code has been 200, I need to capture 302 to do some operations, what should I do?
thanks
The text was updated successfully, but these errors were encountered: