Hi guys I’m having this issue. I’m expecting a Json but instead I recivied an Html. On Postman work fine.
So I get this error.
Hi guys I’m having this issue. I’m expecting a Json but instead I recivied an Html. On Postman work fine.
So I get this error.
I was expecting text but instead I received a bunch of images.
getPosData():Observable<any>{
let url = this.isProd ? this.urlBaseProd : this.urlBase;
url += "pos/getposall";
return this.httpClient.get(url);
}
Instead of abusing any
, define a business object interface:
interface Pos {
stuff: string;
moreStuff: string;
noIdeaWhatGoesInHere: number;
}
Then, all you have to do is:
this.httpClient.get<Pos>(url);
HttpClient
will automatically give you an Observable<Pos>
.
Hi,
You have a problem in your backend. The backend responds with code 200, but should throw a 500 error.
yes, It was a problem on my backend and frontend both was working on same port, so I changed my backend port and now works fine.