Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const httpOptions = {
- headers: new HttpHeaders({ 'Content-Type': 'application/json'}),
- responseType: 'text' as 'text'
- };
- return this.http.post<string>(this.registrationUrl, JSON.stringify(form), httpOptions);
- ERROR in ../../players/players-register/players-register.service.ts(37,82): error TS2345: Argument of type '{ headers: HttpHeaders; responseType: "text"; }' is not assignable to parameter of type '{ headers?: HttpHeaders | { [header: string]: string | string[]; }; observe?: "body"; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; responseType?: "json"; withCredentials?: boolean; }'.
- Types of property 'responseType' are incompatible.
- Type '"text"' is not assignable to type '"json"'.
- tournaments-create.service.ts(23,74): error TS2345: Argument of type '{ headers: HttpHeaders; responseType: "text"; }' is not assignable to parameter of type '{ headers?: HttpHeaders | { [header: string]: string | string[]; }; observe?: "body"; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; responseType?: "json"; withCredentials?: boolean; }'.
- Types of property 'responseType' are incompatible.
- Type '"text"' is not assignable to type '"json"'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement