Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework https//127.0.0.1:111001意外地关闭了连接_Ionic Framework - Fatal编程技术网

Ionic framework https//127.0.0.1:111001意外地关闭了连接

Ionic framework https//127.0.0.1:111001意外地关闭了连接,ionic-framework,Ionic Framework,https//127.0.0.1:111001意外地关闭了连接 我需要点击https//127.0.0.1:111001进行Mantra Rd服务连接。但无法点击关闭错误连接(我使用的是用于移动应用程序的IONIC),同样的事情是使用angular8在web上工作 请帮助…const xhr=new-XMLHttpRequest() let url=”https://127.0.0.1:11100" xhr.open('DEVICEINFO',url); const params=''+'此.D

https//127.0.0.1:111001意外地关闭了连接

我需要点击https//127.0.0.1:111001进行Mantra Rd服务连接。但无法点击关闭错误连接(我使用的是用于移动应用程序的IONIC),同样的事情是使用angular8在web上工作


请帮助…

const xhr=new-XMLHttpRequest()

let url=”https://127.0.0.1:11100"
xhr.open('DEVICEINFO',url);
const params=''+'此.DemoFinalString'+'';
//设置“内容类型”标题
setRequestHeader('Content-Type','text/xml');
xhr.send(参数);
xhr.onload=async()=>{
const parser=new DOMParser();
const xml=parser.parseFromString(xhr.responseText,'text/xml');
this.obj=等待this.xmlToJsonfn(xml);
this.currentDeviceInfo.next(this.obj);
};
xhr.onerror=函数(e){
控制台日志('eoor',e);
如果(e.type=='error'){
//警报(“请下载驱动程序”);
}
};

你能给我们看一些代码吗?你确定你使用的是111001端口吗?马克斯是65535。
let url = "https://127.0.0.1:11100"

xhr.open('DEVICEINFO', url);

const params = '<?xml version="1.0"?> <PidOptions ver="1.0"> <Opts fCount="' + 5 + '" fType="' + "FMR" + '" iCount="' + 1 + '" pCount="' + 1 + '" format="' + 0 + '"   pidVer="' + 2.0 + '" timeout="' + 60000 + '" posh="UNKNOWN" env="' + 'P' + '" /> ' + 'this.DemoFinalString' + '<CustOpts><Param name="mantrakey" value="' + '' + '" /></CustOpts> </PidOptions>';
// set `Content-Type` header
xhr.setRequestHeader('Content-Type', 'text/xml');


xhr.send(params);



xhr.onload = async () => {
  const parser = new DOMParser();
  const xml = parser.parseFromString(xhr.responseText, 'text/xml');
  this.obj = await this.xmlToJsonfn(xml);
  this.currentdeviceInfoSubject.next(this.obj);
};


xhr.onerror = function (e) {
  console.log('eoor', e);
  if (e.type == 'error') {
    // alert('please download the Driver');
  
  }
};