My server displays the output just fine on my browser (localhost:8000). I am running it on one terminal (vscode) and on another terminal (Ubuntu) I run the following command:
$ curl http://localhost:8000
The terminal waits and after a while displays:
curl: (28) Failed to connect to localhost port 8000: Connection timed out
I want to know why they are not connecting. There is nothing in the browser console (I am using Firefox).
CodePudding user response:
Working just fine now. I am able to use curl on ubuntu to pass any sort of request to server. This is what I tried:
Turned firewalls off
Found the WIFi's IPv4 address via ipconfig
Curl works just fine on the other Ubuntu WSL terminal. I am able to PUT, DELETE etc.
Now no idea what happened. Exact same commands weren't producing the result last night.