Function makeHttpCallB

  • A function that takes in an options object and makes an HTTP call.

    The options type is written directly in the function definition.

    Parameters

    • options: {
          url: string;
          method: string;
          headers: Record<string, string>;
          body: string | Blob | FormData;
          mode: "same-origin" | "cors" | "no-cors";
      }
      • 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: "same-origin" | "cors" | "no-cors"

    Returns Promise<Response>