{"id":1011,"date":"2017-10-16T11:37:56","date_gmt":"2017-10-16T03:37:56","guid":{"rendered":"http:\/\/www.siediyer.cn\/?p=1011"},"modified":"2017-10-16T11:37:58","modified_gmt":"2017-10-16T03:37:58","slug":"android-http%e5%ae%9e%e4%be%8b-%e4%bd%bf%e7%94%a8get%e6%96%b9%e6%b3%95%e5%92%8cpost%e6%96%b9%e6%b3%95%e5%8f%91%e9%80%81%e8%af%b7%e6%b1%82","status":"publish","type":"post","link":"https:\/\/www.siediyer.cn\/?p=1011","title":{"rendered":"Android HTTP\u5b9e\u4f8b \u4f7f\u7528GET\u65b9\u6cd5\u548cPOST\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42"},"content":{"rendered":"<h2>Web\u7a0b\u5e8f\uff1a\u4f7f\u7528GET\u548cPOST\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42<\/h2>\n<p>\u9996\u5148\u5229\u7528MyEclispe+Tomcat\u5199\u597d\u4e00\u4e2aWeb\u7a0b\u5e8f\uff0c\u5b9e\u73b0\u7684\u529f\u80fd\u5c31\u662f\u63d0\u4ea4\u7528\u6237\u4fe1\u606f\uff1a\u7528\u6237\u540d\u548c\u5e74\u9f84\uff0c\u4f7f\u7528GET\u548cPOST\u4e24\u79cd\u63d0\u4ea4\u65b9\u5f0f\u3002<\/p>\n<p>\u7528<strong>\u6d4f\u89c8\u5668<\/strong>\u6253\u5f00\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1012\" src=\"http:\/\/www.siediyer.cn\/wp-content\/uploads\/2017\/10\/18155129-b486e091cca741738bb67b5577645384.png\" width=\"548\" height=\"232\" alt=\"\" srcset=\"https:\/\/qiniu.shijitianchen.com\/2017\/10\/18155129-b486e091cca741738bb67b5577645384.png 548w, https:\/\/qiniu.shijitianchen.com\/2017\/10\/18155129-b486e091cca741738bb67b5577645384-300x127.png 300w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/p>\n<p>\u4e0d\u7ba1\u4ee5\u54ea\u4e00\u79cd\u65b9\u5f0f\uff0c\u63d0\u4ea4\u4ee5\u540e\u663e\u793a\u5982\u4e0b\u9875\u9762\uff0c\u5c06\u63d0\u4ea4\u7684\u4fe1\u606f\u518d\u663e\u793a\u51fa\u6765\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1013\" src=\"http:\/\/www.siediyer.cn\/wp-content\/uploads\/2017\/10\/18155147-01a434bb3b864511910d64b3eb7048d1.png\" width=\"317\" height=\"119\" alt=\"\" srcset=\"https:\/\/qiniu.shijitianchen.com\/2017\/10\/18155147-01a434bb3b864511910d64b3eb7048d1.png 317w, https:\/\/qiniu.shijitianchen.com\/2017\/10\/18155147-01a434bb3b864511910d64b3eb7048d1-300x113.png 300w\" sizes=\"auto, (max-width: 317px) 100vw, 317px\" \/><\/p>\n<p>\u5173\u952e\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:default decode:true \">&lt;%@ page language=\"java\" import=\"java.util.*\" pageEncoding=\"UTF-8\"%&gt;\r\n&lt;%\r\nString path = request.getContextPath();\r\nString basePath = request.getScheme()+\":\/\/\"+request.getServerName()+\":\"+request.getServerPort()+path+\"\/\";\r\n%&gt;\r\n\r\n&lt;!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\"&gt;\r\n&lt;html&gt;\r\n  &lt;head&gt;\r\n    &lt;base href=\"&lt;%=basePath%&gt;\"&gt;\r\n    \r\n    &lt;title&gt;My JSP 'index.jsp' starting page&lt;\/title&gt;\r\n    &lt;meta http-equiv=\"pragma\" content=\"no-cache\"&gt;\r\n    &lt;meta http-equiv=\"cache-control\" content=\"no-cache\"&gt;\r\n    &lt;meta http-equiv=\"expires\" content=\"0\"&gt;    \r\n    &lt;meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\"&gt;\r\n    &lt;meta http-equiv=\"description\" content=\"This is my page\"&gt;\r\n    &lt;!--\r\n    &lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"styles.css\"&gt;\r\n    --&gt;\r\n  &lt;\/head&gt;\r\n  \r\n  &lt;body&gt;\r\n    This is \u5723\u9a91\u58ebWind's page. &lt;br&gt;\r\n    &lt;p&gt;\r\n        \u4ee5GET\u65b9\u6cd5\u53d1\u9001\uff1a&lt;br&gt;\r\n    &lt;form action=\"servlet\/WelcomeUserServlet\" method=\"get\"&gt;\r\n        Username: &lt;input type=\"text\" name=\"username\" value=\"\"&gt;\r\n        Age: &lt;input type=\"text\" name=\"age\" value=\"\"&gt;\r\n        &lt;input type=\"submit\" value=\"Submit\"&gt;\r\n    &lt;\/form&gt;\r\n    &lt;\/p&gt;\r\n        &lt;p&gt;\r\n        \u4ee5POST\u65b9\u6cd5\u53d1\u9001\uff1a&lt;br&gt;\r\n    &lt;form action=\"servlet\/WelcomeUserServlet\" method=\"post\"&gt;\r\n        Username: &lt;input type=\"text\" name=\"username\" value=\"\"&gt;\r\n        Age: &lt;input type=\"text\" name=\"age\" value=\"\"&gt;\r\n        &lt;input type=\"submit\" value=\"Submit\"&gt;\r\n    &lt;\/form&gt;\r\n    &lt;\/p&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\nindex.jsp<\/pre>\n<p>\u7b2c\u4e8c\u4e2a\u9875\u9762\u663e\u793a\u7ed3\u679c\uff1a<\/p>\n<pre class=\"lang:default decode:true \">package com.shengqishiwind;\r\n\r\nimport java.io.IOException;\r\nimport java.io.PrintWriter;\r\n\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\n\r\npublic class WelcomeUserServlet extends HttpServlet\r\n{\r\n    \/**\r\n     * The doGet method of the servlet. &lt;br&gt;\r\n     *\r\n     * This method is called when a form has its tag value method equals to get.\r\n     * \r\n     * @param request the request send by the client to the server\r\n     * @param response the response send by the server to the client\r\n     * @throws ServletException if an error occurred\r\n     * @throws IOException if an error occurred\r\n     *\/\r\n    public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException\r\n    {\r\n        process(request, response);\r\n    }\r\n\r\n    \/**\r\n     * The doPost method of the servlet. &lt;br&gt;\r\n     *\r\n     * This method is called when a form has its tag value method equals to post.\r\n     * \r\n     * @param request the request send by the client to the server\r\n     * @param response the response send by the server to the client\r\n     * @throws ServletException if an error occurred\r\n     * @throws IOException if an error occurred\r\n     *\/\r\n    public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException\r\n    {\r\n        process(request, response);\r\n    }\r\n    \r\n    private void process(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException\r\n    {\r\n        String username = request.getParameter(\"username\");\r\n        String age = request.getParameter(\"age\");\r\n        \r\n        response.setContentType(\"text\/html\");\r\n        PrintWriter out = response.getWriter();\r\n        \r\n        out.println(\"&lt;html&gt;&lt;head&gt;&lt;title&gt;Welcome!&lt;\/title&gt;&lt;\/head&gt;\");\r\n        out.println(\"&lt;body&gt; Welcome my dear friend!&lt;br&gt;\");\r\n        out.println(\"Your name is: \" + username + \"&lt;br&gt;\");\r\n        out.println(\"And your age is: \" + age + \"&lt;\/body&gt;&lt;\/html&gt;\");\r\n        \r\n        out.flush();\r\n        out.close();\r\n        \r\n    }\r\n\r\n\r\n\r\n}\r\n\r\nWelcomeUserServlet<\/pre>\n<h2>Android\u7a0b\u5e8f\uff1a\u4f7f\u7528GET\u65b9\u6cd5\u548cPOST\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42<\/h2>\n<p>\u4e0a\u9762\u662f\u7528<strong>\u6d4f\u89c8\u5668<\/strong>\u8bbf\u95ee\u9875\u9762\u5e76\u63d0\u4ea4\u6570\u636e\uff0c\u5982\u679c\u60f3\u5728<strong>Android\u5ba2\u6237\u7aef<\/strong>\u63d0\u4ea4\uff0c\u670d\u52a1\u5668\u7aef\u7684\u4ee3\u7801\u662f\u4e0d\u7528\u53d8\u7684\uff0c\u53ea\u8981\u5199\u597d\u5ba2\u6237\u7aef\u4ee3\u7801\u5373\u53ef\uff1a<\/p>\n<p><strong>\u9996\u5148\u8981\u5728manifest\u4e2d\u52a0\u4e0a\u8bbf\u95ee\u7f51\u7edc\u7684\u6743\u9650\uff1a<\/strong><\/p>\n<pre class=\"lang:default decode:true \">&lt;manifest ... &gt;\r\n    &lt;uses-permission android:name=\"android.permission.INTERNET\" \/&gt;\r\n    ...\r\n&lt;\/manifest&gt;<\/pre>\n<p>\u5e03\u5c40\u6587\u4ef6\uff1a<\/p>\n<pre class=\"lang:default decode:true \">&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\" &gt;\r\n\r\n    &lt;TextView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Username:\" \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/name\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:inputType=\"text\" \/&gt;\r\n\r\n    &lt;TextView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"User Age:\" \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/age\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:inputType=\"number\" \/&gt;\r\n\r\n    &lt;Button\r\n        android:id=\"@+id\/submit_get\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Submit using GET\" \/&gt;\r\n\r\n    &lt;Button\r\n        android:id=\"@+id\/submit_post\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Submit using POST\" \/&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/result\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\" \r\n        android:textColor=\"#0000FF\"\r\n        android:textSize=\"14sp\"&gt;\r\n    &lt;\/TextView&gt;\r\n\r\n&lt;\/LinearLayout&gt;\r\n\r\nactivity_http_demo2.xml<\/pre>\n<p>\u4e3b\u8981Activity\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:default decode:true \">package com.example.httpdemo2;\r\n\r\nimport java.io.BufferedReader;\r\nimport java.io.IOException;\r\nimport java.io.InputStream;\r\nimport java.io.InputStreamReader;\r\nimport java.io.UnsupportedEncodingException;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\nimport org.apache.http.HttpEntity;\r\nimport org.apache.http.HttpResponse;\r\nimport org.apache.http.NameValuePair;\r\nimport org.apache.http.client.HttpClient;\r\nimport org.apache.http.client.entity.UrlEncodedFormEntity;\r\nimport org.apache.http.client.methods.HttpGet;\r\nimport org.apache.http.client.methods.HttpPost;\r\nimport org.apache.http.impl.client.DefaultHttpClient;\r\nimport org.apache.http.message.BasicNameValuePair;\r\n\r\nimport android.os.Bundle;\r\nimport android.app.Activity;\r\nimport android.util.Log;\r\nimport android.view.Menu;\r\nimport android.view.View;\r\nimport android.view.View.OnClickListener;\r\nimport android.widget.Button;\r\nimport android.widget.EditText;\r\nimport android.widget.TextView;\r\n\r\npublic class HttpDemo2Activity extends Activity\r\n{\r\n    private String TAG = \"http\";\r\n    private EditText mNameText = null;\r\n    private EditText mAgeText = null;\r\n\r\n    private Button getButton = null;\r\n    private Button postButton = null;\r\n\r\n    private TextView mResult = null;\r\n\r\n    \/\/ \u57fa\u672c\u5730\u5740\uff1a\u670d\u52a1\u5668ip\u5730\u5740\uff1a\u7aef\u53e3\u53f7\/Web\u9879\u76ee\u903b\u8f91\u5730\u5740+\u76ee\u6807\u9875\u9762\uff08Servlet\uff09\u7684url-pattern\r\n    private String baseURL = \"http:\/\/192.168.11.6:8080\/HelloWeb\/servlet\/WelcomeUserServlet\";\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState)\r\n    {\r\n        Log.i(TAG, \"onCreate\");\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_http_demo2);\r\n\r\n        mNameText = (EditText) findViewById(R.id.name);\r\n        mAgeText = (EditText) findViewById(R.id.age);\r\n        mResult = (TextView) findViewById(R.id.result);\r\n\r\n        getButton = (Button) findViewById(R.id.submit_get);\r\n        getButton.setOnClickListener(mGetClickListener);\r\n        postButton = (Button) findViewById(R.id.submit_post);\r\n        postButton.setOnClickListener(mPostClickListener);\r\n    }\r\n\r\n    private OnClickListener mGetClickListener = new View.OnClickListener()\r\n    {\r\n\r\n        @Override\r\n        public void onClick(View v)\r\n        {\r\n            Log.i(TAG, \"GET request\");\r\n            \/\/ \u5148\u83b7\u53d6\u7528\u6237\u540d\u548c\u5e74\u9f84\r\n            String name = mNameText.getText().toString();\r\n            String age = mAgeText.getText().toString();\r\n\r\n            \/\/ \u4f7f\u7528GET\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42,\u9700\u8981\u628a\u53c2\u6570\u52a0\u5728URL\u540e\u9762\uff0c\u7528\uff1f\u8fde\u63a5\uff0c\u53c2\u6570\u4e4b\u95f4\u7528&amp;\u5206\u9694\r\n            String url = baseURL + \"?username=\" + name + \"&amp;age=\" + age;\r\n\r\n            \/\/ \u751f\u6210\u8bf7\u6c42\u5bf9\u8c61\r\n            HttpGet httpGet = new HttpGet(url);\r\n            HttpClient httpClient = new DefaultHttpClient();\r\n\r\n            \/\/ \u53d1\u9001\u8bf7\u6c42\r\n            try\r\n            {\r\n\r\n                HttpResponse response = httpClient.execute(httpGet);\r\n\r\n                \/\/ \u663e\u793a\u54cd\u5e94\r\n                showResponseResult(response);\/\/ \u4e00\u4e2a\u79c1\u6709\u65b9\u6cd5\uff0c\u5c06\u54cd\u5e94\u7ed3\u679c\u663e\u793a\u51fa\u6765\r\n\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                e.printStackTrace();\r\n            }\r\n\r\n        }\r\n    };\r\n\r\n    private OnClickListener mPostClickListener = new View.OnClickListener()\r\n    {\r\n\r\n        @Override\r\n        public void onClick(View v)\r\n        {\r\n            Log.i(TAG, \"POST request\");\r\n            \/\/ \u5148\u83b7\u53d6\u7528\u6237\u540d\u548c\u5e74\u9f84\r\n            String name = mNameText.getText().toString();\r\n            String age = mAgeText.getText().toString();\r\n\r\n            NameValuePair pair1 = new BasicNameValuePair(\"username\", name);\r\n            NameValuePair pair2 = new BasicNameValuePair(\"age\", age);\r\n\r\n            List&lt;NameValuePair&gt; pairList = new ArrayList&lt;NameValuePair&gt;();\r\n            pairList.add(pair1);\r\n            pairList.add(pair2);\r\n\r\n            try\r\n            {\r\n                HttpEntity requestHttpEntity = new UrlEncodedFormEntity(\r\n                        pairList);\r\n                \/\/ URL\u4f7f\u7528\u57fa\u672cURL\u5373\u53ef\uff0c\u5176\u4e2d\u4e0d\u9700\u8981\u52a0\u53c2\u6570\r\n                HttpPost httpPost = new HttpPost(baseURL);\r\n                \/\/ \u5c06\u8bf7\u6c42\u4f53\u5185\u5bb9\u52a0\u5165\u8bf7\u6c42\u4e2d\r\n                httpPost.setEntity(requestHttpEntity);\r\n                \/\/ \u9700\u8981\u5ba2\u6237\u7aef\u5bf9\u8c61\u6765\u53d1\u9001\u8bf7\u6c42\r\n                HttpClient httpClient = new DefaultHttpClient();\r\n                \/\/ \u53d1\u9001\u8bf7\u6c42\r\n                HttpResponse response = httpClient.execute(httpPost);\r\n                \/\/ \u663e\u793a\u54cd\u5e94\r\n                showResponseResult(response);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                e.printStackTrace();\r\n            }\r\n\r\n        }\r\n    };\r\n\r\n    \/**\r\n     * \u663e\u793a\u54cd\u5e94\u7ed3\u679c\u5230\u547d\u4ee4\u884c\u548cTextView\r\n     * @param response\r\n     *\/\r\n    private void showResponseResult(HttpResponse response)\r\n    {\r\n        if (null == response)\r\n        {\r\n            return;\r\n        }\r\n\r\n        HttpEntity httpEntity = response.getEntity();\r\n        try\r\n        {\r\n            InputStream inputStream = httpEntity.getContent();\r\n            BufferedReader reader = new BufferedReader(new InputStreamReader(\r\n                    inputStream));\r\n            String result = \"\";\r\n            String line = \"\";\r\n            while (null != (line = reader.readLine()))\r\n            {\r\n                result += line;\r\n\r\n            }\r\n\r\n            System.out.println(result);\r\n            mResult.setText(\"Response Content from server: \" + result);\r\n        }\r\n        catch (Exception e)\r\n        {\r\n            e.printStackTrace();\r\n        }\r\n\r\n    }\r\n\r\n}<\/pre>\n<p><strong>\u53ef\u4ee5\u4ece\u4e2d\u5bf9\u6bd4GET\u65b9\u6cd5\u548cPOST\u65b9\u6cd5\u7684\u533a\u522b\uff1a<\/strong><\/p>\n<p><strong>GET\u65b9\u6cd5<\/strong>\u9700\u8981\u7528\uff1f\u5c06\u53c2\u6570\u8fde\u63a5\u5728URL\u540e\u9762\uff0c\u5404\u4e2a\u53c2\u6570\u4e4b\u95f4\u7528&amp;\u8fde\u63a5\u3002<\/p>\n<p><strong>POST\u65b9\u6cd5<\/strong>\u53d1\u9001\u8bf7\u6c42\u65f6\uff0c\u4ecd\u7136\u4f7f\u7528\u57fa\u672c\u7684URL\uff0c\u5c06\u53c2\u6570\u4fe1\u606f\u653e\u5728\u8bf7\u6c42\u5b9e\u4f53\u4e2d\u53d1\u9001\u3002<\/p>\n<p>\u5173\u4e8e\u8fd9\u70b9\u7684\u8ba8\u8bba\u4e5f\u53ef\u4ee5\u67e5\u770b\u672c\u535a\u5ba2\u5176\u4ed6\u6587\u7ae0\uff1a<\/p>\n<p><a href=\"http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/05\/26\/3099776.html\">http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/05\/26\/3099776.html<\/a><\/p>\n<p><a href=\"http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/06\/12\/3132702.html\">http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/06\/12\/3132702.html<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u7a0b\u5e8f\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1014\" src=\"http:\/\/www.siediyer.cn\/wp-content\/uploads\/2017\/10\/18160547-5e981ad33b0c4bd0a88c36739858cc50.png\" width=\"640\" height=\"960\" alt=\"\" srcset=\"https:\/\/qiniu.shijitianchen.com\/2017\/10\/18160547-5e981ad33b0c4bd0a88c36739858cc50.png 640w, https:\/\/qiniu.shijitianchen.com\/2017\/10\/18160547-5e981ad33b0c4bd0a88c36739858cc50-200x300.png 200w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2><\/h2>\n<h2>\u53c2\u8003\u8d44\u6599<\/h2>\n<p>Android\u5f00\u53d1\u89c6\u9891\u6559\u7a0bHTTP\u64cd\u4f5c\u3002\u2014\u2014<a href=\"http:\/\/www.marsdroid.org\/\">http:\/\/www.marsdroid.org<\/a><\/p>\n<p>Android Reference: package org.apache.http:<\/p>\n<p><a href=\"http:\/\/developer.android.com\/reference\/org\/apache\/http\/package-summary.html\">http:\/\/developer.android.com\/reference\/org\/apache\/http\/package-summary.html<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e4b\u524d\u6587\u7ae0\u4e2d\uff0c\u5173\u4e8eGET\u548cPOST\u7684\u66f4\u591a\u8ba8\u8bba\uff1a<\/p>\n<p><a href=\"http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/05\/26\/3099776.html\">http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/05\/26\/3099776.html<\/a><\/p>\n<p><a href=\"http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/06\/12\/3132702.html\">http:\/\/www.cnblogs.com\/mengdd\/archive\/2013\/06\/12\/3132702.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web\u7a0b\u5e8f\uff1a\u4f7f\u7528GET\u548cPOST\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42 \u9996\u5148\u5229\u7528MyEclispe+Tomcat\u5199\u597d\u4e00\u4e2aWeb\u7a0b\u5e8f\uff0c\u5b9e\u73b0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1012,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[68,67],"class_list":["post-1011","post","type-post","status-publish","format-standard","hentry","category-android","tag-http","tag-web"],"_links":{"self":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts\/1011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1011"}],"version-history":[{"count":1,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts\/1011\/revisions"}],"predecessor-version":[{"id":1015,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts\/1011\/revisions\/1015"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/media\/1012"}],"wp:attachment":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}