You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
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.
export interface RequestCore {
url: string; // request URL
urlWithParams?: string; // request URL with query parameters added by `HttpParams`
}
/**
* 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
*/
export interface RequestInfo {
req: RequestCore; // concrete type depends upon the Http library
apiBase: string;
collectionName: string;
collection: any;
headers: HeadersCore;
method: string;
id: any;
query: Map<string, string[]>;
resourceUrl: string;
url: string; // request URL
utils: RequestInfoUtilities;
}