I am trying to use timeout in one of my http post. I get error as
ERROR TypeError: this._http.post(...).timeout is not a function
This is how the code looks like:
return this._http.post(this.meetingProcessURL, body )
.timeout(5000)
.catch( err => {
return Observable.throw("Timeout has occurred");
})
.pipe(catchError(this.handleError));
}
I am using angular 6 and rxjs 6.0.0
"@angular/core": "^6.1.0",
"rxjs": "^6.0.0",
"rxjs-compat": "^6.0.0",
What am I doing wrong?
ref: Angular 2 rxjs timeout callback