Edit: Read the part at the end of the question!
I get this error:
My service code:
import { Http, Response, Headers } from \
Well, like it states. The error returned from the observable does not contain the json method. This means that it is not of the type Response, but it just contains the error. You should just try to print out the object in your console and see what's in there:
.catch((error: any) => console.log(error))
You will probably find it's just an xmlhttpresponse object