01-29-2020 5:16 PM - edited 02-03-2024 5:44 PM
I have tried several ways of calling the multichain service with no success. I am using a trial account and I have consistently got the same error. Has anybody had any luck making this work?
getListStreams: function () {
debugger;
var mListStreams = new sap.ui.model.odata.v2.ODataModel(
"myURL");
mListStreams.setHeaders({
"apikey": "myKey",
"Content-Type": "application/json"
});
var mParameters = {
"method": "liststreams"
}
mListStreams.read("/", [mParameters])
var oData = {
"method": "liststreams"
};
mListStreams.create("", oData);
mListStreams.post({
uri: "myURL",
json: true,
headers: {
apikey: "myKey"
},
body: {
"method": "liststreams"
}
});
},
getListStreams2: function () {
debugger;
jQuery.ajax({
type: "POST",
url: "myURL", //"/blockchainasset/*******************************/rpc",
beforeSend: function (request) {
request.setRequestHeader("apikey", "myKey");
},
data: JSON.stringify({
"method": "liststreams"
}),
dataType: "json",
contentType: "application/json",
success: function (data, textStatus, jQxhr) {
debugger;
console.log(data);
},
error: function (jqXhr, textStatus, errorThrown) {
debugger;
console.log(errorThrown);
}
});
},
getListStreams3: function () {
debugger;
$.ajax({
headers: {
"apikey": "myKey"
},
method: "GET",
url: "myURL",
dataType: "JSON"
}).done(function (data) {
debugger;
console.log(data);
});
}
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.