<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Henry BLOG</title>
        <link>https://henrytech.life/</link>
        <description>技術與生活的心得分享</description>
        <lastBuildDate>Mon, 17 Aug 2026 01:32:33 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-TW</language>
        <copyright>All rights reserved 2026, HenryZheng</copyright>
        <item>
            <title><![CDATA[test]]></title>
            <link>https://henrytech.life/article/test-mermaid</link>
            <guid>https://henrytech.life/article/test-mermaid</guid>
            <pubDate>Sat, 03 May 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[test]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-1e8bbae402ee80ab9a6dfad937af3675"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-blank notion-block-1fdbbae402ee8047a4d1eeaa4317644f"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native的Cookie紀錄]]></title>
            <link>https://henrytech.life/article/react-native-cookie</link>
            <guid>https://henrytech.life/article/react-native-cookie</guid>
            <pubDate>Wed, 28 Oct 2020 00:00:00 GMT</pubDate>
            <description><![CDATA[最近在使用React Native開發跨平台APP使用Fetch時…]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-173060f6ef1b4bc1817f98d2b7465842"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-b159809887f64cfe99e694dd07bae043" data-id="b159809887f64cfe99e694dd07bae043"><span><div id="b159809887f64cfe99e694dd07bae043" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b159809887f64cfe99e694dd07bae043" title="內容"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">內容</span></span></h2><div class="notion-text notion-block-563e77b34ae74992a0c04ccef96deda1">最近在使用React Native開發跨平台APP使用Fetch時，遇到Server API會記錄的Cookie，導致如果直接使用Fetch會產生非預期的結果。</div><div class="notion-text notion-block-0b3cc30c86684565b093bba2f11871bd">例如有一個註冊API如下:</div><div class="notion-text notion-block-e534c51e05664042bdb796ef5e14f657">預設會送出cookie導致Server API傳回已經註冊過的問題。</div><div class="notion-text notion-block-75c75f02348343a8b8e128553cad371e">但是可以加上<code class="notion-inline-code">credentials: &#x27;omit&#x27;</code>後，就可以不會送出Cookie了。</div><div class="notion-text notion-block-dc5dbe646bc84b91b614930e8b312b75">結果改成:</div><div class="notion-text notion-block-37504da657c64aa693a034e3a40847cd">沒想到React Native預設會像瀏覽器一樣的行為。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-bbc4c80090364444a8672ec5dee2363e" data-id="bbc4c80090364444a8672ec5dee2363e"><span><div id="bbc4c80090364444a8672ec5dee2363e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#bbc4c80090364444a8672ec5dee2363e" title="測試"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">測試</span></span></h2><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-1d061647c3c349d19424f9c3f5baf420" data-id="1d061647c3c349d19424f9c3f5baf420"><span><div id="1d061647c3c349d19424f9c3f5baf420" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1d061647c3c349d19424f9c3f5baf420" title="參考在stackoverflow上的問題"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b><b>參考在stackoverflow上的問題</b></b></span></span></h2><blockquote class="notion-quote notion-block-7b675f07979b4277887c525f35e2f0f4"><div><em>react-native fetch() cookie persist</em></div><div class="notion-text notion-block-3795c888639b4985a3721deba2c3b2c4"><a class="notion-link" href="https://stackoverflow.com/a/41637805" target="_blank" rel="noopener noreferrer"><em>https://stackoverflow.com/a/41637805</em></a></div></blockquote><div class="notion-text notion-block-710f35e9aec44cb598d3cc6c9231238a">在2015年11月的React Native 0.16版本，Android及iOS的fetch都會設定<code class="notion-inline-code">credential</code></div><div class="notion-blank notion-block-1e5bbae402ee80b0be20ff71052ba285"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>