{"id":2896,"date":"2020-05-09T09:16:38","date_gmt":"2020-05-09T00:16:38","guid":{"rendered":"http:\/\/taki-lab.site\/bocci\/?p=2896"},"modified":"2020-05-09T09:16:42","modified_gmt":"2020-05-09T00:16:42","slug":"%e3%80%90%e3%83%a9%e3%82%ba%e3%83%91%e3%82%a4%e3%80%91%e3%83%8d%e3%83%83%e3%83%88%e3%83%af%e3%83%bc%e3%82%af%e3%81%a7%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e9%80%81%e4%bf%a1%e3%81%99%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/taki-lab.site\/bocci\/?p=2896","title":{"rendered":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3059\u308b\u3002"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"474\" height=\"231\" data-attachment-id=\"2897\" data-permalink=\"https:\/\/taki-lab.site\/bocci\/?attachment_id=2897\" data-orig-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/5d96997f9decf98262b216d7eb16f5d3.jpg?fit=994%2C484&amp;ssl=1\" data-orig-size=\"994,484\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"5d96997f9decf98262b216d7eb16f5d3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/5d96997f9decf98262b216d7eb16f5d3.jpg?fit=474%2C231&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/5d96997f9decf98262b216d7eb16f5d3.jpg?resize=474%2C231&#038;ssl=1\" alt=\"\" class=\"wp-image-2897\" srcset=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/5d96997f9decf98262b216d7eb16f5d3.jpg?w=994&amp;ssl=1 994w, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/5d96997f9decf98262b216d7eb16f5d3.jpg?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/5d96997f9decf98262b216d7eb16f5d3.jpg?resize=768%2C374&amp;ssl=1 768w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/figure>\n\n\n\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u30e9\u30ba\u30d1\u30a4\u306e\u30c7\u30fc\u30bf\u3092Windows PC\u3078\u9001\u4fe1\u3055\u305b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30e9\u30ba\u30d1\u30a4\u5074\u306fPython\u3067HAT\u306e\u30bb\u30f3\u30b5\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u306e\u3067\u3001Python\u3067\u9001\u4fe1\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>Windows\u5074\u306f\u3001\u8a00\u8a9e\u306f\u4f55\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306fC#\u3067\u66f8\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u4eca\u56de\u306f\u901a\u4fe1\u304c\u3067\u304d\u308b\u3068\u3053\u308d\u307e\u3067\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30e9\u30ba\u30d1\u30a4\u5074\u306e\u30bd\u30fc\u30b9\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import json\nimport urllib.request\n\nurl = 'http:\/\/192.168.1.3:8000'\ndata = {\n    'foo': 123,\n}\nheaders = {\n    'Content-Type': 'application\/json',\n}\n\nreq = urllib.request.Request(url, json.dumps(data).encode(), headers)\nwith urllib.request.urlopen(req) as res:\n    body = res.read()\n<\/code><\/pre>\n\n\n\n<p>\u3053\u3061\u3089\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u4e38\u30d1\u30af\u30ea\u3067\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/qiita.com\/hoto17296\/items\/8fcf55cc6cd823a18217\">https:\/\/qiita.com\/hoto17296\/items\/8fcf55cc6cd823a18217<\/a><\/p>\n\n\n\n<p>Windows\u5074\u306e\u30b3\u30fc\u30c9\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Net;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace http_server\n{\n    class Program\n    {\n        static void Main(string&#91;] args)\n        {\n            try\n            {\n                HttpListener listener = new HttpListener();\n                listener.Prefixes.Add(\"http:\/\/192.168.1.3:8000\/\");\n                listener.Start();\n                while (true)\n                {\n                    HttpListenerContext context = listener.GetContext();\n                    HttpListenerRequest req = context.Request;\n                    StreamReader reader = new System.IO.StreamReader(req.InputStream, req.ContentEncoding);\n                    string s = reader.ReadToEnd();\n                    Console.WriteLine(s);\n                    HttpListenerResponse res = context.Response;\n                    res.StatusCode = 200;\n                    byte&#91;] content = Encoding.UTF8.GetBytes(\"HELLO\");\n                    res.OutputStream.Write(content, 0, content.Length);\n                    res.Close();\n                }\n            }\n            catch (Exception ex)\n            {\n                Console.WriteLine(\"Error: \" + ex.Message);\n            }\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>\u30db\u30f3\u30c8\u306b\u30c7\u30fc\u30bf\u3092\u9001\u53d7\u4fe1\u3059\u308b\u3060\u3051\u306e\u30b3\u30fc\u30c9\u3067\u3001\u30a8\u30e9\u30fc\u3068\u304b\u306f\u5168\u304f\u8003\u616e\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>Windows\u5074\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5148\u306b\u5b9f\u884c\u3057\u3001\u305d\u306e\u5f8c\u30e9\u30ba\u30d1\u30a4\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Windows\u5074\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u3053\u3093\u306a\u611f\u3058\u3067\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"137\" height=\"79\" data-attachment-id=\"2898\" data-permalink=\"https:\/\/taki-lab.site\/bocci\/?attachment_id=2898\" data-orig-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/9165a9c3a1e81297a328c0aa3413f9f4.jpg?fit=137%2C79&amp;ssl=1\" data-orig-size=\"137,79\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"9165a9c3a1e81297a328c0aa3413f9f4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/9165a9c3a1e81297a328c0aa3413f9f4.jpg?fit=137%2C79&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/9165a9c3a1e81297a328c0aa3413f9f4.jpg?resize=137%2C79&#038;ssl=1\" alt=\"\" class=\"wp-image-2898\"\/><\/figure>\n\n\n\n<p>\u3053\u308c\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308c\u3070\u30bb\u30f3\u30b5\u30fc\u306e\u60c5\u5831\u3082Windows PC\u306b\u9001\u4fe1\u3067\u304d\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"\/\/blog.with2.net\/link\/?2023426:1010\" target=\"_blank\" rel=\"noreferrer noopener\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/12\/03a6eee54039f74ded0b8f7548b1868f.png?w=474\" alt=\"\" title=\"\u30d1\u30bd\u30b3\u30f3\u30e9\u30f3\u30ad\u30f3\u30b0\"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u30e9\u30ba\u30d1\u30a4\u306e\u30c7\u30fc\u30bf\u3092Windows PC\u3078\u9001\u4fe1\u3055\u305b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u30e9\u30ba\u30d1\u30a4\u5074\u306fPython\u3067HAT\u306e\u30bb\u30f3\u30b5\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u308b\u306e\u3067\u3001Python\u3067\u9001\u4fe1\u3092\u884c\u3044\u307e\u3059\u3002 Windows\u5074\u306f\u3001\u8a00\u8a9e\u306f\u4f55\u3067\u3082\u826f\u3044\u306e\u3067\u3059 &hellip; <a href=\"https:\/\/taki-lab.site\/bocci\/?p=2896\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3059\u308b\u3002<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[187,3],"tags":[188],"class_list":["post-2896","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","category-3","tag-188"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8SDbY-KI","jetpack-related-posts":[{"id":2906,"url":"https:\/\/taki-lab.site\/bocci\/?p=2906","url_meta":{"origin":2896,"position":0},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u30bb\u30f3\u30b5\u30fc\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3059\u308b\u3002","author":"taki","date":"2020\u5e745\u670810\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2896 \u4eca\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/39f39e098ef0038af6d1a2b8d092a64d.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4223,"url":"https:\/\/taki-lab.site\/bocci\/?p=4223","url_meta":{"origin":2896,"position":1},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30ea\u30e2\u30fc\u30c8\u3067\u30ab\u30e1\u30e9\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a","author":"taki","date":"2020\u5e7410\u67081\u65e5","format":false,"excerpt":"\u3044\u3084\u3001\u4eca\u56de\u306f\u7d50\u69cb\u30cf\u30de\u3063\u305f\u3002 \u3053\u308c\u304c\u534a\u65e5\u9811\u5f35\u3063\u305f\u6210\u679c\u3060\u3002 \u307e\u305a\u306f\u30e9\u30ba\u30d1\u30a4\u5074\u3002 import base6\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/10\/795a241f54d363e98d9ebe27e7b4d0df.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3881,"url":"https:\/\/taki-lab.site\/bocci\/?p=3881","url_meta":{"origin":2896,"position":2},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u3044\u308d\u3044\u308d\u8a08\u6e2c\u30e2\u30cb\u30bf\u30fc\u3011CPU\u6e29\u5ea6\u3092Windows\u5074\u3067\u8868\u793a\u3059\u308b","author":"taki","date":"2020\u5e748\u670817\u65e5","format":false,"excerpt":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u3001\u30e9\u30ba\u30d1\u30a4\u306eCPU\u6e29\u5ea6\u3092\u53d6\u5f97\u3067\u304d\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u3001 https:\/\/taki-lab\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/505bfe4f2996feadac2b27f7cde6a5cf.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2914,"url":"https:\/\/taki-lab.site\/bocci\/?p=2914","url_meta":{"origin":2896,"position":3},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u53d7\u4fe1\u3057\u305f\u30bb\u30f3\u30b5\u30fc\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u3002","author":"taki","date":"2020\u5e745\u670811\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2906 \u524d\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/e89fa556202c4f0f790d859f634480f2.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3807,"url":"https:\/\/taki-lab.site\/bocci\/?p=3807","url_meta":{"origin":2896,"position":4},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u3044\u308d\u3044\u308d\u8a08\u6e2c\u30e2\u30cb\u30bf\u30fc\u3011HTTP\u30b5\u30fc\u30d0\u3092\u5b9f\u88c5\u3059\u308b","author":"taki","date":"2020\u5e748\u67085\u65e5","format":false,"excerpt":"\u6e2c\u5b9a\u3057\u305f\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3092Windows\u5074\u3067\u8868\u793a\u3055\u305b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u524d\u56deHAT\u3067\u3084\u3063\u305f\u3068\u304d\u306f\u30e9\u30ba\u30d1\u30a4\u5074\u3092\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/eecbeac11e65259e24fe97f1a4e08d0d.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/eecbeac11e65259e24fe97f1a4e08d0d.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/eecbeac11e65259e24fe97f1a4e08d0d.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4024,"url":"https:\/\/taki-lab.site\/bocci\/?p=4024","url_meta":{"origin":2896,"position":5},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u3044\u308d\u3044\u308d\u8a08\u6e2c\u30e2\u30cb\u30bf\u30fc\u3011Windows\u5074\u304b\u3089\u3082\u64cd\u4f5c\u3057\u3061\u3083\u3046","author":"taki","date":"2020\u5e749\u67083\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=3978 \u6700\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2896"}],"version-history":[{"count":1,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2896\/revisions"}],"predecessor-version":[{"id":2899,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2896\/revisions\/2899"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}