fixes password, application oauth2 flows

This commit is contained in:
Anna Bodnia
2017-04-26 17:50:09 +03:00
parent 4c40fa192b
commit bb73dd49d8
7 changed files with 108 additions and 69 deletions

View File

@@ -566,3 +566,15 @@ export const sorters = {
method: (a, b) => a.get("method").localeCompare(b.get("method"))
}
}
export const buildFormData = (data) => {
let formArr = []
for (let name in data) {
let val = data[name]
if (val !== undefined && val !== '') {
formArr.push([name, "=", encodeURIComponent(val).replace(/%20/g,"+")].join(""))
}
}
return formArr.join("&")
}