* Performs a GET request to the given endpoint. Use fetchJson * to automatically unwrap the response JSON as a typed object.
(
endpoint: string,
useAuthenticityToken = false,
headers: Record<string, string> = {}
)
| 113 | * to automatically unwrap the response JSON as a typed object. |
| 114 | */ |
| 115 | async function get( |
| 116 | endpoint: string, |
| 117 | useAuthenticityToken = false, |
| 118 | headers: Record<string, string> = {} |
| 119 | ): Promise<Response> { |
| 120 | return sendRequest('GET', endpoint, undefined, useAuthenticityToken, headers); |
| 121 | } |
| 122 | |
| 123 | async function put( |
| 124 | endpoint: string, |