Commit c62914ca authored by guozhipeng's avatar guozhipeng

fix

parent 91e3a7cd
...@@ -125,13 +125,14 @@ sap.ui.define([ ...@@ -125,13 +125,14 @@ sap.ui.define([
}, },
/** /**
* 获取token * 获取token
* 任何一个odata的get请求都可以获取x-csrf-token,供后续后台请求使用
* @param completeCallback * @param completeCallback
*/ */
getCsrfToken(completeCallback) { getCsrfToken(completeCallback) {
let that = this let that = this
jQuery.ajax({ jQuery.ajax({
method: "GET", method: "GET",
url: this.baseUrl + "odata/v4/orderService/OrderHeader", url: this.baseUrl + "odata/v4/exampleService/ExampleView",
headers: { headers: {
'x-csrf-token': 'fetch' 'x-csrf-token': 'fetch'
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment