1/**
2 * Copyright © 2022 650 Industries.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7import { Platform } from 'react-native';
8
9export async function fetchAsync(url: string): Promise<{ body: string; headers: Headers }> {
10  const response = await fetch(url, {
11    method: 'GET',
12    headers: {
13      // No real reason for this but we try to use this format for everything.
14      'expo-platform': Platform.OS,
15    },
16  });
17  return {
18    body: await response.text(),
19    headers: response.headers,
20  };
21}
22