?????? ?????? ???????????? ? ??????? Base64 ? ???????? ????? JSON-???????.
URL-????? ???????
https://local.cipher.kiev.ua:9090/api/v1/ticket/{uuid}/data
?????
POST
????????? ???????
uuid | String | ????????????? ?????? |
????????????? ????????? ???????
Content-Type | application/json |
????????? JSON ??????? ???????
??? | ??? | ???????? | ?????????? ???????? |
---|---|---|---|
base64Data | String | ?????? ?????? ? ??????? Base64 | ????????? ?????????????? Base64 ?????? |
?????
??? ?????? | Content-type | ?????????? ????????? | ?????? ??????????? |
---|---|---|---|
200 | application/json | message | { |
503 | application/json | message | { |
400 | application/json | message | { "message" : "?????? ???????????." } |
500 | application/json | message failureCause | { |
????????? JSON ??????? ??????
???????? | ??? ?????? | ???????? |
---|---|---|
message | String | ???????? ?????????? ?????????? ???????? |
failureCause | String | ???????? ??????? ????????????? ?????? |
?????? ???? ?? JavaScript + jQuery 2.2.4
var data = { base64Data: base64SessionData } $.ajax({ url: "https://local.cipher.kiev.ua:9090/api/v1/ticket/79343564-147f-4a2a-ac2a-182d7a55f802/data", type: "POST", 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; } })