They are asking me to send some data through the post method. I leave the code first:
addImage(image, params): Observable<any> {
const httpOptions = {
headers: new HttpHeaders({
'Authorization': this.token,
'Content-Type': 'multipart/form-data',
'Content-Disposition': 'form-data; filename=${image.name}'
})
};
this.data = params;
this.data.file = image;
return this.http.post(this.url , this.data, httpOptions);
The request is not worth it, I think what they expect to receive is the data of a form (form that neither exists nor will exist). There is some way to simulate how that entry would be. That is, how to simulate the input that the form would give us when launching?.
Greetings.