2017-10-19 3 views

答えて

1

はい。 Check this。レスポンスがリダイレクトされたリクエストから来ているかどうかを確認するためにチェック

は、Responseオブジェクトにこのフラグをチェックするように簡単 ようです。

if (response.redirected) { 
    //... 
} 

あなたはそれを無効にすることができます

fetch("awesome-picture.jpg", { redirect: "error" }).then(function(response) { 
    //some stuff 
}).then(function(imageBlob) { 
    //some other stuff 
}); 
関連する問題