Rest fix
This commit is contained in:
parent
08c855a278
commit
594dcc9191
@ -12,7 +12,9 @@ export class OFRest {
|
|||||||
this.obj = {
|
this.obj = {
|
||||||
"serviceName": serviceName,
|
"serviceName": serviceName,
|
||||||
"methodName": methodName,
|
"methodName": methodName,
|
||||||
"param": data
|
"param": {
|
||||||
|
"model" : JSON.stringify(data)
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -22,18 +24,13 @@ export class OFRest {
|
|||||||
|
|
||||||
public Call() {
|
public Call() {
|
||||||
|
|
||||||
let m :any;
|
|
||||||
m = {
|
|
||||||
"model" : this.obj
|
|
||||||
}
|
|
||||||
|
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
// mode: 'no-cors'
|
// mode: 'no-cors'
|
||||||
},
|
},
|
||||||
body: JSON.stringify(m)
|
body: JSON.stringify(this.obj)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ module.exports = {
|
|||||||
historyApiFallback: true,
|
historyApiFallback: true,
|
||||||
contentBase: [__dirname + '/public', __dirname + '/dist', __dirname + '/node_modules'], // match the output path
|
contentBase: [__dirname + '/public', __dirname + '/dist', __dirname + '/node_modules'], // match the output path
|
||||||
publicPath: '/' ,// match the output `publicPath`
|
publicPath: '/' ,// match the output `publicPath`
|
||||||
host: '192.168.1.105',
|
host: '192.168.1.209',
|
||||||
port: 9091,
|
port: 9091,
|
||||||
stats: {
|
stats: {
|
||||||
colors: true
|
colors: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user