126ad19fcSEvan Bacon/**
226ad19fcSEvan Bacon * Copyright © 2022 650 Industries.
326ad19fcSEvan Bacon *
426ad19fcSEvan Bacon * This source code is licensed under the MIT license found in the
526ad19fcSEvan Bacon * LICENSE file in the root directory of this source tree.
626ad19fcSEvan Bacon */
726ad19fcSEvan Baconexport async function fetchAsync(url: string): Promise<{ body: string; headers: Headers }> {
826ad19fcSEvan Bacon  const response = await fetch(url, {
926ad19fcSEvan Bacon    method: 'GET',
1026ad19fcSEvan Bacon    headers: {
1126ad19fcSEvan Bacon      // No real reason for this but we try to use this format for everything.
12*4a8c0978SEvan Bacon      'expo-platform': 'web',
1326ad19fcSEvan Bacon    },
1426ad19fcSEvan Bacon  });
1526ad19fcSEvan Bacon  return {
1626ad19fcSEvan Bacon    body: await response.text(),
1726ad19fcSEvan Bacon    headers: response.headers,
1826ad19fcSEvan Bacon  };
1926ad19fcSEvan Bacon}
20