{"id":431291,"date":"2021-04-18T08:29:15","date_gmt":"2021-04-18T00:29:15","guid":{"rendered":"http:\/\/4563.org\/?p=431291"},"modified":"2021-04-18T08:29:15","modified_gmt":"2021-04-18T00:29:15","slug":"%e5%bc%82%e6%ad%a5-httpclient-%e6%98%af%e5%a6%82%e4%bd%95%e5%a4%84%e7%90%86%e5%a4%a7%e9%87%8f%e5%b9%b6%e5%8f%91%e8%af%b7%e6%b1%82%e7%9a%84","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=431291","title":{"rendered":"\u5f02\u6b65 httpclient \u662f\u5982\u4f55\u5904\u7406\u5927\u91cf\u5e76\u53d1\u8bf7\u6c42\u7684"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5f02\u6b65 httpclient \u662f\u5982\u4f55\u5904\u7406\u5927\u91cf\u5e76\u53d1\u8bf7\u6c42\u7684               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : git00ll <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u8fd9\u51e0\u5929\u5728\u770b\u5f02\u6b65\u7684 http \u5ba2\u6237\u7aef(java)\uff0c\u6709\u4e00\u70b9\u4e0d\u89e3\u3002<\/p>\n<ol>\n<li>\u5148\u8bb2\u8bb2\u540c\u6b65\u7684 http \u5ba2\u6237\u7aef\uff0c\u5982 okhttp httpclient \u6bcf\u4e2a\u8bf7\u6c42\u5835\u585e\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u8d85\u8fc7\u5ba2\u6237\u7aef\u7684 http \u8fde\u63a5\u6c60\u5927\u5c0f\u540e\uff0c\u7ee7\u7eed\u8bf7\u6c42\uff0c\u4f1a\u5835\u585e\u4f4f\uff0c\u76f4\u5230\u6709\u8fde\u63a5\u53ef\u7528\uff0c\u8fd9\u5f88\u597d\u7406\u89e3\u3002<\/li>\n<li>\u5f02\u6b65\u7684 http \u5ba2\u6237\u7aef\u5982 apache async httpclient \u5185\u90e8\u4f7f\u7528\u7684 java nio\uff0c\u6bcf\u6b21\u53d1\u9001\u8bf7\u6c42\u65f6\u90fd\u662f\u975e\u5835\u585e\u7684\uff0c\u9700\u8981\u4f20\u9012\u56de\u6389\u51fd\u6570\u5904\u7406 http response\uff0c\u4f46\u662f\u5373\u4f7f\u662f nio \u5927\u5c0f\u4e5f\u4e0d\u662f\u65e0\u9650\u7684\uff0c\u5982\u679c\u4e0b\u6e38\u8fd4\u56de\u592a\u6162\uff0c\u5927\u91cf\u7684\u8bf7\u6c42\u6ce8\u518c\u5230 nio \u91cc\uff0c\u5230\u8fbe\u6781\u9650\u540e\u4f1a\u600e\u4e48\u6837\u5462\uff0c\u4f1a\u5835\u585e\u5417\uff1f\u5982\u679c\u5185\u90e8\u6709\u961f\u5217\uff0c\u90a3\u961f\u5217\u6ee1\u4e86\u4f1a\u5835\u585e\u5417\uff1f<\/li>\n<\/ol><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5651393\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mazyi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u961f\u5217\u6ee1\u4e86\u5835\u4e0d\u5835\u770b\u4e00\u770b\u8fdb\u961f\u5217\u7684\u4ee3\u7801\u5c31\u77e5\u9053\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5651394\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ikas <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u961f\u5217\u6ee1\u4e86\u5f53\u7136\u662f\u8981\u4e00\u4e2a\u7b56\u7565\u4e86,\u6bd4\u5982\u4e22\u5f03,\u6bd4\u5982\u5148\u4fdd\u5b58\u5230\u5176\u4ed6\u5730\u65b9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5651395\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ikas <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6b63\u5e38\u5982\u679c\u662f\u5927\u91cf\u7684\u8bf7\u6c42,\u672c\u8eab\u5c31\u4e0d\u80fd\u53ea\u662f\u4f9d\u8d56 httpclient \u7684\u5f02\u6b65,\u800c\u662f\u81ea\u5df1\u8981\u5b9e\u73b0\u4e00\u4e2a&#8217;\u6d88\u8d39\u961f\u5217&#8217;,\u4f7f\u7528\u81ea\u5df1\u7684\u7b56\u7565\u5904\u7406                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5f02\u6b65 httpclient \u662f\u5982\u4f55&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/431291"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431291"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/431291\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431291"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}