Open
Description
Describe the bug
I need to use the request info in my app, you say I can inject in my components constructor the netlify.request
, and, for example, print on the console the request url, but where can I see that output running locally with netlify serve
? Please help
To Reproduce
Steps to reproduce the behavior:
- I added the
@Inject('netlify.request') @Optional() request?: Request,
to the main component (AppComponent), the home page component and a service constructors:
constructor(
// ...
@Inject('netlify.request') @Optional() request?: Request,
@Inject('netlify.context') @Optional() context?: Context,
) {
console.log(`#request:`, request);
}
- I run first with netlify serve, but no console output was shown. Then, I used netlify dev, and got
path: undefined
headers: undefined
everywhere.
Expected behavior
Be able to obtain the request url and headers to extract info and use to SSR load data.
Versions
- Angular.js: 18.0.0
If you're using the CLI to build
- OS: Windows
- netlify/cli version: 17.23.8
If you're using file-based installation
- netlify.toml: