0

I'm using Postman to debug my WebAPI. There are 2 cases where Postman does not get any answer from my API: 1. When I set a breakpoint for incoming requests 2. When my API is not running

In 1st case, Postman waits (for inifinity theoretically), but in the other it returns me an information that something is wrong after a few seconds.

So my question is: How does that work? In the 1st case, request gets to my server, but it doesn't send any response until I stop debugging, which can take minutes possibly. In the 2nd case, Postman also does not egt any repsonse, but somehow it knows after a few seconds that it will never get it.

Loreno
  • 668
  • 8
  • 26
  • You probably set your breakpoints in some code that runs after a TCP connection has been opened. Whereas if your server is not running, no connection is even established. Postman surely keeps established connections alive for much longer than the timeout for trying to open a connection in the first place. – Paul Apr 07 '18 at 08:32
  • In the second case you get a 500 or 404 based on the situation ans hence it knows that the Server hosting APIs is Offline – N00b Pr0grammer Apr 07 '18 at 08:32

1 Answers1

0

In first request the connect to server is successful and it waits for a reply until postman timeout defined.

Second request it connect to server and get reply immediately with an error.

You can increase or decrease max time postman wait for response by using XHR Timeout

Set how long the app should wait for a response before saying that the server isn't responding.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233