title: Fetch with 'If-None-Match': "etag" header always returning 200 in React Native app
body: <p>I'm encountering a very strange issue in a react native app where a simple fetch with an etag is always returning a <code>200</code> rather than an expected <code>304</code>:</p>
  
  <pre><code>const response = await fetch(url, {
    method: 'GET',
    headers: {
      'If-None-Match': etag
    },
  });
  </code></pre>
  
  <p>where <code>etag</code> is something like <code>"33a64df551425fcc55e4d42a148795d9f25f89d4"</code></p>
  
  <p>When I make this request directly through something like Postman/Insomnia, it is working and I get the appropriate <code>304</code> response.</p>
  
  <p>Inspecting the app in Reactotron, I can see the network request header seems to be correct:</p>
  
  <p><a href="https://i.stack.imgur.com/KXKzN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KXKzN.png" alt="Reactotron screenshot"></a></p>
  
  <p>If I copy the JSON request as cURL I get the following:</p>
  
  <blockquote>
    <p>curl -H "if-none-match:"33a64df551425fcc55e4d42a148795d9f25f89d4"" <a href="https://url/to/api" rel="noreferrer">https://url/to/api</a></p>
  </blockquote>
  
  <p>With a slight modification to show only the headers:</p>
  
  <blockquote>
    <p>curl -sD - -o /dev/null -H "if-none-match:"33a64df551425fcc55e4d42a148795d9f25f89d4"" <a href="https://url/to/api" rel="noreferrer">https://url/to/api</a></p>
  </blockquote>
  
  <p>Which also only returns a <code>200</code>, but if I escape the quotes around the etag like so, it works:</p>
  
  <blockquote>
    <p>curl -sD - -o /dev/null -H "if-none-match:\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" <a href="https://url/to/api" rel="noreferrer">https://url/to/api</a></p>
  </blockquote>
  
  <p>I'm genuinely confused because I've tried all variants of:</p>
  
  <pre><code>'If-None-Match': etag
  'If-None-Match': `"${etag}"`
  'If-None-Match': `\"${etag}\"`
  'If-None-Match': '"' + etag + '"'
  </code></pre>
  
  <p>to no avail, what am I doing wrong?</p>
  
  <p>Putting the same fetch request into an html file and testing in the browser works with the expected <code>304</code> status.</p>