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?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to