Hi John,
We are trying approve the workflow decision by POST the HTTP request with Headers (SAP Business Workflow with SAP NetWeaver Gateway version 7.4).
HTTP POST with Headers (x-csrf-token)
we are following the SAP document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/509c922a-aa9a-2f10-328c-d3814560de06?overridelayout=true
Below the code we are trying the same.
var oHeaders = {};
oHeaders["x-csrf-token"] = "<?php echo $csrftoken['xcsrfToken'];?>";
oHeaders["Authorization"] = "Basic ZGV2ZWxvcGVyOm5vc2VjcmV0";
jQuery.ajax({
type: "POST",
data: null,
headers: oHeaders,
success: successFunc,
error: errorFuncDefault
});
function successFunc(data) {
alert(data);
}
function errorFuncDefault(data) {
alert(data + 'error');
}
We facing the below errors like Method not supported some time and Authorization failed and we tried all possible ways but no result.
Could please help me, where we are going wrong.
Thanks in advances
Venky.