$.ajax({
url: "https://local.cipher.kiev.ua:9091/api/v1/accessToken",
type: "POST",
dataType: "json",
contentType: "application/json",
data: JSON.stringify({accessTimesNumber: 2})
}).done(function (jsonResponse, textStatus, xhr) {
message = jsonResponse.message;
accessTokenUuid = jsonResponse.accessTokenUuid;
}).fail(function (xhr) {
try {
var jsonResponse = JSON.parse(xhr.responseText);
message = jsonResponse.message;
} catch (e) {
message = (xhr.responseText == undefined) ? "Помилка при отриманні розширенні на використання ЕП." : xhr.responseText;
}
}) |