Closed hjchin closed 6 years ago
for now, I add an interface
export interface HttpRequest{
body: string;
}
and assign req to this type just to get it works,
Only now I read this comment.
/**
* Interface for object w/ info about the current request url
* extracted from an Http Request.
* Also holds utility methods and configuration data from this service
*/
It closes to what I thought. I just add body to the RequestCore then. Thanks
Looks like you're ok. Closing
Why is this closed?
Hi,
I'm trying to retrieve the request body from RequestInfo and put some logic in the interception to mimic the backend logic.
When I dump the RequestInfo from chrome dev tool, I can see it is in RequestInfo.req.body. Req is a type of HttpRequest. However, the interfaces.ts where RequestInfo interface is defined, states req is a type of RequestCore. RequestCore has total different definition than HttpRequest.
How do I retrieve request body in RequestInfo? Thanks.