var requestJson = {
method: "POST",
body: { '__metadata': { 'type': 'SP.Data.Data RequestListItem' }, 'Requestor': 'Test' }
//facilities: webMercatorUtils.webMercatorToGeographic(this.geom).x + "," + webMercatorUtils.webMercatorToGeographic(this.geom).y + ";",
////outSR: this.geom.spatialReference.wkid,
//token: this.token.token,
//defaultBreaks: [this.selectBufferUnits.value],
//f: "json"
};
esriRequest({
url: "http://sp/ops/Portal/_api/Lists/GetByTitle('ListItem')/items",
content: requestJson,
handleAs: "json",
withCredentials:true
}).then(lang.hitch(this, function (response) {
this._showError(response);
}), function (err) {
new Message({ titleLabel: "Warning", message: err.message });
});
Here is the code and getting the error in the console is below.
init.js:141 GET https://sp/ops/Portal/_api/Lists/GetByTitle('ListItem')/items?method=POST&body=%5Bobject%20Object%5D net::ERR_CONNECTION_TIMED_OUT
l @ init.js:141
b.xhr @ init.js:92
b.xhrGet @ init.js:92
w @ init.js:1010
g @ init.js:1013
A @ init.js:1019
(anonymous) @ init.js:1019
c @ init.js:103
C.then.then @ init.js:105
always @ init.js:112
C @ init.js:1019
_onBtnSubmitClicked @ Widget.js?wab_dv=2.6:102
(anonymous) @ init.js:63
init.js:89 f {message: "Unable to load //sp/ops/Portal/_api/Lists/GetByT…?method=POST&body=%5Bobject%20Object%5D status: 0", response: {…}, status: 0, responseText: "", xhr: XMLHttpRequest, …}