-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 23: IP address fetch and display #90
Conversation
Added exception text and implemented the most fundamental known method to http request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @shivangswain please go ahead and merge this PR.
@@ -1,4 +1,4 @@ | |||
import asyncio, websockets, sys, click, time, os | |||
import asyncio, websockets, sys, click, http.client, time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's as optimized as it gets. Good work!
connection.request("GET", "/") | ||
response = connection.getresponse() | ||
return response.read().decode("UTF-8") | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generalized exception handling would prevent service crashes in all times.
Signed-off-by: t0xic0der <[email protected]>
Added logistical changes to complement #90
Added the most fundamental method to fetch and display public IP address in the server verbose with exception handling
Closes #23