Estoy tratando de enviar una solicitud http de publicación para cambiar el contenido de mi archivo, pero cuando realizo la solicitud de publicación, el registro dice error 404, el archivo no existe. (http se trabaja en la misma url). No tengo idea de por qué hace eso, ¿alguien puede ayudarme?
bd.servicio.ts
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Authorization': 'my-auth-token' }) }; postData(filename:string, data:any[]){ return this.http.post(filename,JSON.stringify(data),httpOptions);recherche.component.ts
toggle(cpr:string){ this.bdService.lstLivres=this.livres; this.bdService.togglePanier(cpr); this.bdService.postData('http://localhost:4200/assets/data/panier.json', this.bdService.getPanier()).subscribe(r=>console.log(r)); ); }http://localhost:4200/activos/datos/panier.json
[{ "id":1, "cpr":1, "aut":"Denis martin" , "tit": "Manger a tout les jours", "pri": 75, "rab": 0.10, "des": "Comment lire à tout les jours et ne pas arrêter", "nic": "Secondaire", "img": "../assets/images/image2.jpg" }, { "id":2, "cpr":2, "aut":"Denis martin" , "tit": "Lire à tout les jours", "pri": 50, "rab": 0.10, "des": "Comment lire à tout les jours et ne pas arrêter", "nic": "Secondaire", "img": "../../assets/images/image2.jpg" }, { "id":3, "cpr":3, "aut":"Denis martin" , "tit": "Lire à tout les jours", "pri": 50, "rab": 0.10, "des": "Comment lire à tout les jours et ne pas arrêter", "nic": "Secondaire", "img": "../../assets/images/image2.jpg" } ]