I am encountering an issue with connecting to a web service deployed on an Apache server using Jersey. The error message I receive is:
Failed to load http://192.168.1.200:8199/CheckinnWeb/webapi/myresource/query: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.
Here is the code from my service.ts file:
getlogin(): Observable<ILogin[]> {
return this._http
.get(this._loginurl, this.headers)
.map((response: Response) => <ILogin[]> response.json())
.catch(this.handleError);
}
This is the URL of my server:
_loginurl='http://192.168.1.200:8199/CheckinnWeb/webapi/myresource/'+this.encodedString;
Please assist me in resolving this issue. Thank you!