I am trying to call HTTP GET from component on click of button
clicked(event) {
let commentOperation:Observable<Response>;
commentOperation = (this.http.get(this.heroesUrl)
.map(this.extractData)
.catch(this.handleError));
}
//App Server side
@RequestMapping(value = "/{resource}", method = RequestMethod.POST, consumes=MediaType.APPLICATION_JSON_VALUE, produces=MediaType.ALL_VALUE)
public ResponseEntity getTest (@PathVariable String resource, @RequestBody Map<String, Object> id)
{
System.out.println("ResponseEntity\t"+resource+"id"+id);
ResponseEntity<String> rs = new ResponseEntity<String>("Test est"+id, HttpStatus.OK);
return rs;
}
Call is not reaching server.
How to know where it is failing in web client,
Call is not going to handlError.
If I try to console.log (commentOperation ) it prints 3 objects.
Where to look for response?