Http request not working - is not a function


I have the following code:

var headers = new Headers();
headers.append(‘Content-Type’, ‘application/json’);
        (res: Response) => res.json()
        (res:Person) => {
            this.postResponse = res;
            console.log("VALUE RECEIVED: ",res);
        (x) => {
            /* this function is executed when there's an ERROR */
            console.log("ERROR: "+x);
        () => {
            /* this function is executed when the observable ends (completes) its stream */

but I keep getting the error:…).map is not a function

. How can I fix this?



Can you post the code from your constructor?

It appears as though you never define the http property of this class.