/** * Make HTTP request to API */ export async function requestApi(method, url, authToken, body, extraHeaders) { const headers = { 'Content-Type': 'application/json', ...extraHeaders, }; if (authToken) { headers['Authorization'] = `Bearer ${authToken}`; } const options = { method, headers, }; if (body) { options.body = body; } const response = await fetch(url, options); const responseBody = await response.text(); return { status: response.status, body: responseBody, }; } //# sourceMappingURL=http.js.map