'How to determine which point of the code sent a specific http request

As in the screenshot I have a complex Angular application which I see now for the first time; from a specific page, in the Chrome Dev Tools -> 'Network' tab I see a list of http call (see the red arrow). I should edit a specific HTTP GET call, in order to change some params.

The question is: how can I see which file / component / service sent a particular HTTP GET call and which line of code? Is something like that in the Chrome Dev Tools?

enter image description here



Solution 1:[1]

Are you allowed to access the source code of web application? Modern IDE's or text editor (e.g: VSCode) allow us to search by a keywork. In Google Chrome, you can go to initiator tab and see the request call track: Request call track example from google chrome.

Solution 2:[2]

You really can't tell from the network traffic or Fiddler where calls are originating from.

One thing you can try is to make your network calls unique by adding an unused parameter to the url. Something like this:

https://my-app/api/getSomething/25?originator=hello-world

But if you do this, you may have to adjust your service routes to ignore the query string parameter. It depends on how you're implementing the backend.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Carlos Daniel
Solution 2 Dharman