I am polling my python server by ajax request. When server is on I am getting status code proper as 200, but when I close the server using CTRL+C, i notice that my polling continues. When I printed status code in console got it 0 when server is closed.
When i hit that ajax url on browser with closed server i get temporarily unavailable.
I can’t understand why I am getting status code 0? It should be either 404(Not found) or 503(Temporarily not available).
Thanks
The server didn’t send a response, so there can’t be an HTTP status code. See the specification: