Skip to content

Instantly share code, notes, and snippets.

function encodeAsUrl_(params){
return Object.keys(params).map(key => key + '=' + params[key]).join('&')
}
function handleResponce_(xhr, cb, errcb){
return function () {
if (4 === xhr.readyState) {
if(xhr.status >= 200 && xhr.status < 400){
cb(xhr);