www/pwmgr.js
/* Make a request to the Vault server. Return the parsed JSON result.
*/
Make a request to the Vault server. Return the parsed JSON result.
Make a request to the Vault server . Return the parsed JSON result .
function vaultGetRequest(relURL) {
    var xhttp = new XMLHttpRequest();
    xhttp.open("GET", BASEURL + encodeURI(relURL), false);
    xhttp.setRequestHeader("Content-type", "application/json");
    xhttp.setRequestHeader("X-Vault-Token",window.userToken);
    xhttp.send();
	if (xhttp.status != 200) return null
    console.log("%s response=%s",xhttp.status, xhttp.responseText);
    return JSON.parse(xhttp.responseText);
}
function vaultGetRequest ( relURL ) { var xhttp = new XMLHttpRequest ( ) ; xhttp . open ( "GET" , BASEURL + encodeURI ( relURL ) , false ) ; xhttp . setRequestHeader ( "Content-type" , "application/json" ) ; xhttp . setRequestHeader ( "X-Vault-Token" , window . userToken ) ; xhttp . send ( ) ; if ( xhttp . status != 200 ) return null console . log ( "%s response=%s" , xhttp . status , xhttp . responseText ) ; return JSON . parse ( xhttp . responseText ) ; }
Make a request to the Vault server.
Make a request to the Vault server .