We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dda6d3 commit 060f454Copy full SHA for 060f454
1 file changed
0x11-python-network_1/4-hbtn_status.py
@@ -4,8 +4,8 @@
4
'''
5
import requests
6
7
-url = requests.get('https://intranet.hbtn.io/status')
8
-print('Body response:')
9
-print('\t- type: {}'.format(type(url.text)))
10
-if url.status_code == 200:
11
- print('\t- content: OK')
+if __name__ == "__main__":
+ url = requests.get('https://intranet.hbtn.io/status')
+ print('Body response:')
+ print('\t- type: {}'.format(type(url.text)))
+ print('\t- content: {}'.format(url.text))
0 commit comments