makeHttpCallB
makeHttpCallB(
options: {
url: string;
method: string;
headers: Record<string, string>;
body: string | Blob | FormData;
mode: "cors" | "no-cors" | "same-origin";
},
): Promise<Response>
Parameters
options: {
url: string;
method: string;
headers: Record<string, string>;
body: string | Blob | FormData;
mode: "cors" | "no-cors" | "same-origin";
}url: string
method: string
e.g. GET, POST, PUT, DELETE
headers: Record<string, string>
e.g.
{ 'Authorization': 'Bearer <access token>' }
body: string | Blob | FormData
mode: "cors" | "no-cors" | "same-origin"
A function that takes in an options object and makes an HTTP call.
The options type is written directly in the function definition.