Title: a_simple_http_client · Issue #1 · vianer/python · GitHub
Open Graph Title: a_simple_http_client · Issue #1 · vianer/python
X Title: a_simple_http_client · Issue #1 · vianer/python
Description: import argparse import httplib REMOTE_SERVER_HOST='www.python.org' REMOTE_SERVER_PATH='/' class HTTPClient: def __init__(self,host): self.host=host def fetch(self,patch): http=httplib.HTTP(self.host): #prepare header http.putrequest("GET...
Open Graph Description: import argparse import httplib REMOTE_SERVER_HOST='www.python.org' REMOTE_SERVER_PATH='/' class HTTPClient: def __init__(self,host): self.host=host def fetch(self,patch): http=httplib.HTTP(self.hos...
X Description: import argparse import httplib REMOTE_SERVER_HOST='www.python.org' REMOTE_SERVER_PATH='/' class HTTPClient: def __init__(self,host): self.host=host def fetch(self,patch): http=httpl...
Opengraph URL: https://github.com/vianer/python/issues/1
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"a_simple_http_client","articleBody":"import argparse\nimport httplib\n\nREMOTE_SERVER_HOST='www.python.org'\nREMOTE_SERVER_PATH='/'\n\nclass HTTPClient:\n\n```\n def __init__(self,host):\n self.host=host\n\n def fetch(self,patch):\n http=httplib.HTTP(self.host):\n\n #prepare header\n http.putrequest(\"GET\",path)\n http.putheader(\"User-Agent\",__file__)\n http.putheader(\"Host\",self.host)\n http.putheader(\"Accept\",\"*/*\")\n http.endheaders()\n\n try:\n errcode,errmsg,headers=http.getreply()\n except Exception,e:\n print \"Client failde error code:%s message:%s headers:%s\" %(errcode,errmsg,headers)\n else:\n print \"Got homepage from %s\" %self.host\n\n file=http.getfile()\n return file.read()\n```\n\nif **main** == \"**main**\":\n parser=argparse.ArgumentParse(description='HTTP Client Example')\n parse.add_argument('--host',action=\"store\",dest=\"host\",default=REMOTE_SERVER_HOST)\n parser.add_argument('--path',action=\"store\",dest=\"path\",default=REMOTE_SERVER_PATH)\n given_args=parser.parse_args()\n host,path=given_args.host,given_args.path\n client=HTTPClient(host)\n print client.fetch(path)\n","author":{"url":"https://github.com/vianer","@type":"Person","name":"vianer"},"datePublished":"2015-05-27T17:20:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1/python/issues/1"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ffdff285-7a11-c2d6-6fb5-8dc0f034587d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A32A:9EB11:433E340:578A77C:697DB391 |
| html-safe-nonce | 8ee20ac7c72b938303ceef0e67f366551c22fc90e4e06b465c1b28f9ffc9906e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzJBOjlFQjExOjQzM0UzNDA6NTc4QTc3Qzo2OTdEQjM5MSIsInZpc2l0b3JfaWQiOiI2NTQ0MzE2MDI1MTU4ODc0MDAxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9e2bc72481bbc03ef15edf4da91e1b9973f7348c914733e526c247668a750483 |
| hovercard-subject-tag | issue:81540098 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/vianer/python/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dc8a86fbff84b3af99d9ced2faf7d0f4b3a03e26cc50f3a7d767b2d8900633d6/vianer/python/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dc8a86fbff84b3af99d9ced2faf7d0f4b3a03e26cc50f3a7d767b2d8900633d6/vianer/python/issues/1 |
| og:image:alt | import argparse import httplib REMOTE_SERVER_HOST='www.python.org' REMOTE_SERVER_PATH='/' class HTTPClient: def __init__(self,host): self.host=host def fetch(self,patch): http=httplib.HTTP(self.hos... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vianer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/vianer/python git https://github.com/vianer/python.git |
| octolytics-dimension-user_id | 12438753 |
| octolytics-dimension-user_login | vianer |
| octolytics-dimension-repository_id | 36381207 |
| octolytics-dimension-repository_nwo | vianer/python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36381207 |
| octolytics-dimension-repository_network_root_nwo | vianer/python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width