This way I was able to call MyService
private REST_API_SERVER = 'http://localhost:4040/abc';
public sendGetRequest() {
var myFormData = { email: '[email protected]', password: '123' };
const headers = new HttpHeaders();
headers.append('Content-Type', 'application/json');
//HTTP POST REQUEST
this.httpClient
.post(this.REST_API_SERVER, myFormData, {
headers: headers,
})
.subscribe((data) => {
console.log("i'm from service............", data, myFormData, headers);
return data;
});
}