test grpc rest
This commit is contained in:
parent
cda14bb92e
commit
e67759372a
|
@ -100,18 +100,25 @@ export class MemberRegist extends React.Component<any, any> {
|
||||||
"phone": this.state.phone
|
"phone": this.state.phone
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let exeObj :any;
|
||||||
|
exeObj = {
|
||||||
|
"serviceName":"Member",
|
||||||
|
"methodName":"Regist",
|
||||||
|
"param":obj
|
||||||
|
}
|
||||||
|
|
||||||
output = JSON.stringify(obj);
|
|
||||||
|
|
||||||
obj = { "value": output };
|
output = JSON.stringify(exeObj);
|
||||||
|
|
||||||
fetch('http://192.168.1.209:8080/v1/example/echo', {
|
// obj = { "value": output };
|
||||||
|
|
||||||
|
fetch('http://192.168.1.203:8080/v1/overflow/services', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
// mode: 'no-cors'
|
// mode: 'no-cors'
|
||||||
},
|
},
|
||||||
body: JSON.stringify(obj)
|
body: output
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then(function (json) {
|
}).then(function (json) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user