{"id":3396,"date":"2020-09-28T22:09:52","date_gmt":"2020-09-28T20:09:52","guid":{"rendered":"http:\/\/van-maanen.com\/?p=3396"},"modified":"2020-09-28T22:09:52","modified_gmt":"2020-09-28T20:09:52","slug":"using-python-to-send-http-commands","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=3396","title":{"rendered":"Using Python to send http commands"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I now play with Python to communicate with HTTP servers. The idea that signals are sent to a server and the answer is subsequently analysed. My first attempt is shown below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import urllib3\nhttp = urllib3.PoolManager()\nresp = http.request(&apos;GET&apos;, &apos;http:\/\/van-maanen.com\/&apos;)\nprint(resp.data)\nprint(resp.status)\n <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">the output can be seen as a series of symbols that can be stored in an html file that can be read with any Internet browser.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I now play with Python to communicate with HTTP servers. The idea that signals are sent to a server and the answer is subsequently analysed. My first attempt is shown below: import urllib3 http = urllib3.PoolManager() resp = http.request(&apos;GET&apos;, &apos;http:\/\/van-maanen.com\/&apos;) print(resp.data) print(resp.status) the output can be seen as a series of symbols that can be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3396","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3396"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3396\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3396"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}