...
Параметр | Тип даних | Опис |
---|---|---|
message | String | Опис результату проведення операції |
failureCause | String | Опис причини появи помилки |
Приклад коду на JavaScript + jQuery 2.2.4 у випадку використання захищеного носія в активному режимі
Code Block | ||
---|---|---|
| ||
var data = {
keyStorePath: "@. Avtor SecureToken 0"
}
$.ajax({
url: "https://local.cipher.kiev.ua:9090/api/v1/ticket/79343564-147f-4a2a-ac2a-182d7a55f802/keyStore",
type: "PUT",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data)
}).done(function (jsonResponse, textStatus, xhr) {
message = jsonResponse.message;
}).fail(function (xhr) {
try {
var jsonResponse = JSON.parse(xhr.responseText);
message = jsonResponse.message;
failureCause = jsonResponse.failureCause;
} catch (e) {
message = (xhr.responseText == undefined) ? "Помилка при завантаженні даних ключового контейнеру." : xhr.responseText;
}
}) |
Приклад коду на JavaScript + jQuery 2.2.4 у випадку використання файлового контейнеру зі вказівкою шляху
Code Block | ||
---|---|---|
| ||
var data = {
keyStorePath: "z:\\sharedFiles\\temp\\7\\Molyakov_overdue-DS+Arg.pfx"
}
$.ajax({
url: "https://local.cipher.kiev.ua:9090/api/v1/ticket/79343564-147f-4a2a-ac2a-182d7a55f802/keyStore",
type: "PUT",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data)
}).done(function (jsonResponse, textStatus, xhr) {
message = jsonResponse.message;
}).fail(function (xhr) {
try {
var jsonResponse = JSON.parse(xhr.responseText);
message = jsonResponse.message;
failureCause = jsonResponse.failureCause;
} catch (e) {
message = (xhr.responseText == undefined) ? "Помилка при завантаженні даних ключового контейнеру." : xhr.responseText;
}
}) |
Приклад коду на JavaScript + jQuery 2.2.4 у випадку використання даних файлового контейнеру
Code Block | ||
---|---|---|
| ||
var data = {
base64Data: "данные файлового контейнера в кодировке base64"
}
$.ajax({
url: "https://local.cipher.kiev.ua:9090/api/v1/ticket/79343564-147f-4a2a-ac2a-182d7a55f802/keyStore",
type: "PUT",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data)
}).done(function (jsonResponse, textStatus, xhr) {
message = jsonResponse.message;
}).fail(function (xhr) {
try {
var jsonResponse = JSON.parse(xhr.responseText);
message = jsonResponse.message;
failureCause = jsonResponse.failureCause;
} catch (e) {
message = (xhr.responseText == undefined) ? "Помилка при завантаженні даних ключового контейнеру." : xhr.responseText;
}
}) |