Biometric Informations Show

Instance URL:
Token:
Biometric ID:
Output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf8">
        <title>Fedena API</title>
        <script src="https://s3.amazonaws.com/api_play/src/js/jquery-2.1.1.min.js"></script>
        <script src="https://s3.amazonaws.com/api_play/src/js/vkbeautify.0.99.00.beta.js"></script>
        <script>
            $(function() {
                $("#show-biometric-informations").click(function() {
                    var fedena_server = $("#fedena_server").val();
                    var token = $("#token").val();
                    var biometric_id=$("#biometric_id").val();
                    var result_div = $("#result");
                    show_biometric_informations(fedena_server,token,biometric_id,result_div);
                });
            });
        </script>
        <script>
            function show_biometric_informations(fedena_server,token,biometric_id,result_div){
                result_div.html("");                            //optional
                try
                {
                    var xhr = new XMLHttpRequest();
                    xhr.onreadystatechange = function(evt)
                    {
                        if (xhr.readyState==4 && xhr.status==200)
                        {
                            result_div.html(show_response(evt.target.responseText));
                        }
                        else if (xhr.readyState==4)
                        {
                            result_div.html(show_response(evt.target.responseText));
                        }
                    }

                    xhr.open('GET', fedena_server+"/api/biometric_informations/"+biometric_id);
                    xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
                    xhr.setRequestHeader('Authorization', 'Token token="'+token+'"');
                    xhr.send();
                }
                catch(err)
                {
                    alert(err.message);
                }
            }

            function show_response(str){
                str = vkbeautify.xml(str,4); /* Optional, To format the XML output*/
                return str.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g,"<br />");
            }
        </script>
    </head>
    <body>
        <h3> Biometric Informations Show </h3>
        <div>
            <table>
                <tr>
                    <td>
                        Instance URL:
                    </td>
                    <td>
                        <input id="fedena_server" type="text" placeholder="ex: http://myschoolsis.com" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Token:
                    </td>
                    <td>
                        <input id="token" type="text" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Biometric ID:
                    </td>
                    <td>
                        <input id="biometric_id" type="text" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button type="button" id="show-biometric-informations" value="Show Biometric Informations">Show Biometric Informations</button>
                    </td>
                    <td></td>
                </tr>
            </table>
            <pre> <code id="result" style="text-align: left; float: left;"></code></pre>
        </div>

    </body>
</html>
loading..