shaochuyun57

============问题描述============


我想做一个用户注册登录的功能,用map把用户名和密码发到了服务器端,但是在Servlet服务器端,怎么才能从response的输入流得到用户的名称和密码呢?求前辈指教,小白感激不尽

============解决方案1============


HttpPost request = new HttpPost(url);
            // 设置参数的编码
            request.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8)); 

ArrayList<NameValuePair> params使用json数据

============解决方案2============


其实你的问题是:  怎么提取http response 中的数据流。

分类:

技术点:

相关文章:

  • 2021-04-25
  • 2021-12-25
  • 2021-09-22
  • 2021-05-19
  • 2021-10-19
  • 2022-01-08
  • 2021-05-06
猜你喜欢
  • 2022-02-04
  • 2021-06-08
  • 2021-04-09
  • 2022-01-08
  • 2021-04-14
  • 2021-06-16
相关资源
相似解决方案