There is a service with post-request:
postData(data: any) { return this.http.post('http://localhost:8080', data); } I register it in a component. I want to use it. I pass it to the method:
sendCsvFile() { const formData = new FormData(); formData.append('csv-file', this.selectedFile, this.selectedFile.name); this.http.postData(formData, { reportProgress: true, observe: 'events' })... But I can not, gives this error:
error TS2554: Expected 1 arguments, but got 2.
postDatacalled viathis.http? - Nick