UNPKG

fetchbee

Version:

A lightweight JS library to simplify all kinds of API calls.

11 lines (8 loc) 298 B
import { postFetchWithMethod } from "./helpers/postHelper"; async function putFetch(url, body, options = {}) { if (!url || typeof url !== "string") { console.warn("putFetch: URL is missing or invalid."); return null; } return postFetchWithMethod("PUT", url, body || {}, options); }