<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kagasu</author_name>
  <author_url>https://blog.hatena.ne.jp/kagasu/</author_url>
  <blog_title>備忘録</blog_title>
  <blog_url>https://kagasu.hatenablog.com/</blog_url>
  <categories>
    <anon>Node.js</anon>
    <anon>JavaScript</anon>
  </categories>
  <description>Ⅰ. はじめに タイトルの通り「node-fetchでCookieを設定する方法」です。 Ⅱ. やり方 1. サンプルプログラムを書く const fetch = require('node-fetch'); (async () =&gt; { const url = 'https://google.com' // 初回リクエスト。Set-Cookieレスポンスヘッダを読み取る。 const res = await fetch(url) const cookies = res.headers.raw()['set-cookie'] const cookie = cookies.map(x =&gt; x.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagasu.hatenablog.com%2Fentry%2F2021%2F06%2F18%2F115632&quot; title=&quot;node-fetchでCookieを設定する方法 - 備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-06-18 11:56:32</published>
  <title>node-fetchでCookieを設定する方法</title>
  <type>rich</type>
  <url>https://kagasu.hatenablog.com/entry/2021/06/18/115632</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
