这是将请求发送到服务器的方法:
public Get(body: IGetPassportInfoRequest): Observable<IGetPassportInfoResponse> {
let httpHeaders = new HttpHeaders({
'Content-Type' : 'application/json',
'Cache-Control': 'no-cache'
});
let options = {
headers: httpHeaders
};
return this.http.post('http://ip:9090/terminal/get', body, options)
.catch(this.handleError);
}
其中主体是对象:
const data: IGetPassportInfoRequest = {
doc_serie: this.step1.controls['passport_seria'].value,
doc_number: this.step1.controls['passport_number'].value
};
在Chrome网络中,我看到:
答案 0 :(得分:1)