2020-01-01から1年間の記事一覧
Hatena Blogも好きなんだけど、noteに変更します。 今までありがとうございました! これからもよろしくお願いします〜。 note.com
こんな風に、 jsでfetchを使ってサーバーからのresponseの情報(今回の場合は時間)を取得したい時ありますよね。 fetch(location.href) .then((response) => { if (response.ok) { console.log(response.headers.get('Date')) return } throw new Error('re…