接着上篇《Android 采用get方式提交数据到服务器》,本文来实现采用post方式提交数据到服务器首先对比一下get方式和post方式: 修改布局:<LinearLayout ="http://schemas.android.com/apk/res/and ...
接着上篇《Android 采用get方式提交数据到服务器》,本文来实现采用post方式提交数据到服务器
首先对比一下get方式和post方式:
修改布局:
<LinearLayout ="http://schemas.android.com/apk/res/android" ="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity" > <EditText android:id="@+id/et_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请输入用户名" android:inputType="text" /> <EditText android:id="@+id/et_pwd" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="请输入密码" android:inputType="textPassword" /> <Button android:onClick="LoginByGet" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="GET方式登录" /> <Button android:onClick="LoginByPost" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="POST方式登录" /></LinearLayout>
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:Android 采用post方式提交数据到服务器
关键词:Android
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。