Remove form data
This commit is contained in:
parent
0f2a22c1e8
commit
99bf6e8f7c
1 changed files with 2 additions and 9 deletions
|
|
@ -18,19 +18,12 @@ export class MessageService {
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
sendMessage(url: string, data: any): Observable<JSdata> {
|
sendMessage(url: string, data: any): Observable<JSdata> {
|
||||||
const CreatURL = environment.urlCL.concat('/').concat(url);
|
const CreatURL = environment.urlCL.concat('/').concat(url);
|
||||||
const FData = new FormData();
|
console.log(CreatURL, data);
|
||||||
let i: any;
|
|
||||||
if (data !== null && data !== undefined) {
|
|
||||||
for (i of Object.keys(data)){
|
|
||||||
FData.append(i, data[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this.http.post<JSdata>(
|
return this.http.post<JSdata>(
|
||||||
CreatURL,
|
CreatURL,
|
||||||
FData,
|
data,
|
||||||
{withCredentials: true}
|
{withCredentials: true}
|
||||||
);
|
);
|
||||||
return this.http.post<JSdata>(CreatURL, {withCredentials: true});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue