UNPKG
fetchbee
Version:
latest (3.6.5)
3.6.5
3.5.6
3.2.5
2.0.1
2.0.0
1.2.7
1.2.6
1.2.5
A lightweight JS library to simplify all kinds of API calls.
fetchbee
/
putFetch.js
11 lines
(8 loc)
•
298 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
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); }