0

I have a freenas server with a WEBDAV sharing. I would like to connect my angular backoffice to the nas to get the files list on a directory. After a long research, I didn't find how can I do an http request in angular with a PROPFIND methods.. and get my filelist in xml type.

Thank you for your help. (sorry for my english).

1 Answers1

0

you can use the HttpClient request() method and as a first argument place a string '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);
  )
ALGDB
  • 650
  • 1
  • 6
  • 22