Have seen this but the question was unanswered. So asking this question again.
I was trying to implement a PUT. Which didn't work, I checked the requestInformation
and response
in responseInterceptor
. It turns out that the control never reaches my responseInterceptor
.
This is the http code:
put(url: string, body, options?:RequestOptionsArgs): Observable<StandardModelResponse>{
console.log("inside put, url = ", url, " body = ", body);
return this._http.put(url,body,this._updateRequestHeader(options));
}
The received log is:
My InMemoryDbService
has a collection:
let sessionData = [
{
id: 1,
loginActive: 0
}
];
and it returns the collection like this:
return {sessionData}
I looked through the source, and yes indeed there is an implementation of post and put, but I could not find the in-memory-backend.service.ts
file in my node-modules
for debugging, instead a in-memory-backend.service.js
is there. What is the right way to do this POST
call, what am I missing here?