chore: method signatures for sendPostRequest method
This commit is contained in:
parent
f1b22e7122
commit
bf08883f15
1 changed files with 9 additions and 1 deletions
|
|
@ -3,7 +3,15 @@ const redirectUri = `${window.location.origin}/`;
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
// GENERAL HELPER FUNCTIONS
|
||||
|
||||
// Make a POST request and parse the response as JSON
|
||||
/**
|
||||
* Makes a POST request and parses the response as JSON
|
||||
*
|
||||
* @param {String} url - The resource
|
||||
* @param {Object} params - Configuration options
|
||||
* @returns {Object}
|
||||
*/
|
||||
|
||||
//
|
||||
const sendPostRequest = async (url, params) => {
|
||||
const body = Object.keys(params)
|
||||
.map(key => `${key}=${params[key]}`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue