最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Angular 19 not showing http requestsresponse in network tab from browser - Stack Overflow

programmeradmin2浏览0评论

I'm struggling with a problem in angular 19.

The thing is that I have a http service. The exact same service that I've been doing in previous versions of angular. Everything is working as expected. I'm receiving the response as expected and I'm able to display the information in the screen. All seems to be perfect.

But when I open the developer tools in my chrome browser and go to the Network tab. There's no call there. I mean, in previous version If I do a call to a server, the call was displayed in the list of request in the network tab. So I was able to detect my payload and my response. But this time its not there.

I'm sending just one GET request, and as I mentioned, the request and response are working. But where's the proof of that in my network tab?

One thing to mention, as long as I miswrite the endpoint address, magically the call appears showing the expected error "Not Found" but then I correct the spelling of the address, it simply not there.

Is not my interest to just watch the response, I already did that, my problem is that the list of request filtered by fetch/XHR is not there... also I disabled the cache and the problem is still the same.

Am I doing something wrong?

here's my service

getTopBars(): Observable<IBanner[]> {
  return this.http.get<any>('http://localhost:3000/store/top-bars')
    .pipe(
      map((response) => response.topBars)
    );
}

and I'm calling it like this

 ngOnInit(): void {
   this.bannersService.getTopBars().subscribe((data) => {
     console.log('TOPBARS', data);
   });
 }

And this is the result... showing the answer in the console but not in the Network tab

}

发布评论

评论列表(0)

  1. 暂无评论