Added the put request method to the RequestUtil.js
This commit is contained in:
@ -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);
|
||||||
|
Reference in New Issue
Block a user