Added the put request method to the RequestUtil.js

This commit is contained in:
2022-12-28 03:37:09 +01:00
parent 722cb816f2
commit 8eda24419a

View File

@ -21,6 +21,11 @@ export const jsonRequest = async (path, headers = {}) => {
return (await request(path, "GET", null, headers)).json(); return (await request(path, "GET", null, headers)).json();
} }
// Run a PUT request and post some values
export const putRequest = async (path, body, headers = {}) => {
return await request(path, "PUT", body, headers);
}
// Run a POST request and post some values // Run a POST request and post some values
export const postRequest = async (path, body, headers = {}) => { export const postRequest = async (path, body, headers = {}) => {
return await request(path, "POST", body, headers); return await request(path, "POST", body, headers);