Sends a JSON GET request to a REST endpoint
Shared entry point for REST reads, so request settings common to every call can change in one place. Callers handle the status and body.
The endpoint URL
Promise resolving to the fetch Response
const response = await fetchREST({ url: 'https://gateway.designsystem.umd.edu/v1/feeds/campus-alerts',});if (response.ok) { const data = await response.json();} Copy
const response = await fetchREST({ url: 'https://gateway.designsystem.umd.edu/v1/feeds/campus-alerts',});if (response.ok) { const data = await response.json();}
Sends a JSON GET request to a REST endpoint
Shared entry point for REST reads, so request settings common to every call can change in one place. Callers handle the status and body.