Hello,
I have problems sending a json that will be verified by another server, where then I will get a response from that process has been exist. I’m using HTTP.call, but I have not gotten so far any results in when to functionality.
Already do the tests with postman and everything works me correctly.
Here is a copy of code
// client side event click button
var jsonStr = JSON.stringify(jsonOBJ);
Meteor.call("Json", jsonStr, function(error, result){
if(error){
console.log("error", error);
}
if(result){
console.log(resul);
}
});
///server side
Json(JsonStr) {
var url = "https://api.xxxxxxxxx.com/xxxxxxx-api/4.0/xxxxxx.cgi";
var result = HTTP.call('POST', url,
data: JsonStr
)
return result;
}
//I must receive something like
{
"code": "SUCCESS",
"error": null,
"transactionResponse": {
....
....
....
}
}