P
P
Pogran2016-11-21 12:28:41
Angular
Pogran, 2016-11-21 12:28:41

How to find out which request goes?

i have this code

return this.http.get('http:test/dsp-campaigns', options)
            .map((response: Response) => {
                console.log(response);
                return response.json()
            })

How to test which request leaves? it just doesn't write anything in the console, upon request in netWork

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rail Khusnutdinov, 2016-11-22
@Pogran

return this.http.get('http:test/dsp-campaigns', options)
    .map((response: Response) => response.json()).subscribe(
        data => { console.log(data) },
        error => { console.log(error) }
);

S
saltydogd, 2016-11-21
@saltydogd

Fiddler , WireShark won't work?

D
Dark Hole, 2016-11-21
@abyrkov

Let's start with the fact that this request should be displayed in the network tab.
If you need to wait until it comes to this function, call it manually in the console.
If it is not on the tab anyway and there are no errors (not uncaught, in general), then it is a trite error in the code / module.

R
Ruslan Lopatin, 2016-11-21
@lorus

So the request does not go away until the subscribe is made

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question