When my flask application is started, it says
Running on http://0.0.0.0:80/
How do I send http requests to this server?
I tried
telnet 0.0.0.0 80
But it says:
Trying 0.0.0.0...
telnet: connect to address 0.0.0.0: Invalid argument
I used the request module:
r = requests.get('http://0.0.0.0:80')
It says the same result
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 288, in request
resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 383, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 206, in send
raise ConnectionError(sockerr)
requests.exceptions.ConnectionError: [Errno 22] Invalid argument
The output of netstat is given below:
# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:domain 0.0.0.0:* LISTEN
tcp6 0 0 [::]:domain [::]:* LISTEN
udp 0 0 0.0.0.0:domain 0.0.0.0:*
udp 0 0 0.0.0.0:bootps 0.0.0.0:*
udp6 0 0 [::]:domain [::]:*