(contentType = 'application/json')
| 4 | export {CACHE_EXPIRATION}; |
| 5 | |
| 6 | function createHeaders(contentType = 'application/json') { |
| 7 | return {'Content-Type': contentType}; |
| 8 | } |
| 9 | |
| 10 | export async function apiRequest(path, {allowUnauthorized = false, body, contentType, fetchPriority, headers, ...options} = {}) { |
| 11 | const response = await fetch(path, { |