r[1],
    }), {});
    var json;
    json = JSON.stringify(data);

    // Set up our request
    var XHR = new XMLHttpRequest();

    // Define what happens on after data submission
    XHR.addEventListener('load', function(event) {
        alert('Response: '+event.target.responseText);
    });

    XHR.open('POST', '//localhost:10005/register');
    XHR.setRequestHeader('Content-Type','application/json' );

    // The data sent is what the user provided in the form
    XHR.send(json);
});
</script>
{{end}}