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