离子4角当尝试运行代码我找不到错误

时间:2019-07-25 12:45:37

标签: ionic4

const headers = new Headers();
headers.append('Accept', '*/*');
headers.append('Content-Type','application/x-WWW-form- 
urlencoded;charset=UTF-8' );

const options = new RequestOptions({ headers });
const object = {} as any;

object.CityName =   '';
const postParams = {
  objectData  :   object
} as any;

postParams.dtsessionid = 'DB9C56E7E4BD40EDA2069DF38A8C2036';
postParams.objectData = JSON.stringify(object).replace(/"/g, 
'\'').replace(/&/g, 'and');

this.http.post('https://askfleet.buzzfleet.net:3920/city/getList', 
postParams, options)
  .subscribe(data => {
   }, error => {
    console.log(JSON.stringify(error));
  });

0 个答案:

没有答案