4 ms·
Hey homakov, nice work. might want to remember to encodeURIComponent() around the keys as well: SecureLogin = function(scope){ function toQuery(obj
by missingencoding 9y ago
Hey homakov, nice work. might want to remember to encodeURIComponent() around the keys as well:
SecureLogin = function(scope){
function toQuery(obj){
return Object.keys(obj).reduce(function(a,k){a.push(k+'='+encodeURIComponent(obj[k]));return a},[]).join('&')
- homakov 9y agoThanks! internal toQuery works with predefined a-z keys only so I think it is ok to be this way?
- missingencoding 9y agobetter safe than sorry, as I'm sure you know ;)