Atur panggilan API reaksi folder asli

import ky from "ky";
const apiClient = ky.create({
  prefixUrl: API_URL, // <- ENV variable
  headers: {
    ...
  }
  hooks: {
    beforeRequest: (request) => {...}
    afterResponse: (response) => {...}
});
const { get, post, put, delete: destroy } = apiClient;
export { get, post, put, destroy };
Outrageous Ocelot