Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.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
如何在Angular 5上使用httpclient执行PROPFIND方法?_Angular_Angular5_Httpclient_Webdav_Propfind - Fatal编程技术网

如何在Angular 5上使用httpclient执行PROPFIND方法?

如何在Angular 5上使用httpclient执行PROPFIND方法?,angular,angular5,httpclient,webdav,propfind,Angular,Angular5,Httpclient,Webdav,Propfind,我有一个带有WEBDAV共享的freenas服务器。 我想将我的angular backoffice连接到nas,以获取目录上的文件列表。 经过长时间的研究,我没有发现如何使用PROPFIND方法在angular中执行http请求。。并获取xml类型的文件列表 谢谢你的帮助。 (对不起,我说的是英语)。您可以使用HttpClient request()方法,并将字符串'PROPFIND'作为第一个参数。 this.http.request('PROPFIND', this.WEBDAV_BAS

我有一个带有WEBDAV共享的freenas服务器。 我想将我的angular backoffice连接到nas,以获取目录上的文件列表。 经过长时间的研究,我没有发现如何使用PROPFIND方法在angular中执行http请求。。并获取xml类型的文件列表

谢谢你的帮助。
(对不起,我说的是英语)。

您可以使用
HttpClient request()
方法,并将字符串
'PROPFIND'作为第一个参数。

 this.http.request('PROPFIND', this.WEBDAV_BASE + '/' + directoryName , { headers: headers , responseType: 'text'}).pipe(
      map(res => {
        // your code goes here, play around with 'res'
      })
      catchError(error => error);
  )