以下のように記述することでContent-Type
の値を取得できます。
fetch(url, {
method: 'GET',
}).then((res) => {
console.log(res.headers.get('content-type'))
})
Go to list of users who liked
More than 1 year has passed since last update.
以下のように記述することでContent-Type
の値を取得できます。
fetch(url, {
method: 'GET',
}).then((res) => {
console.log(res.headers.get('content-type'))
})
Register as a new user and use Qiita more conveniently
Go to list of users who liked