게시판 » 개발

How to trigger XHR redirect (response header + status code)

§
작성: 2020-01-27
수정: 2020-01-27

How to trigger XHR redirect (response header + status code)

Hello, is there any possibility to trigger HTTP request by any interface when receiving server redirect (HTTP/302(, and have access to response code, response header)? I tried more methods, onstatuschange when readyState==HEADERS_RECEIVED, but it's too late (aleady have final request responses). Afaik, there's not any earlier event that could hold on receiving the primary response. About fetch( { redirect: 'manual' }) it seems to stop at receiving the redirect, but anyway the complete header isnot available (Response.ok == false, Response.headers is empty, Response.status is 0 - not 302)

댓글 남기기

댓글을 남기려면 로그인하세요.