HttpClient client = new HttpClient();
        GetMethod get = new GetMethod(URL);
        get.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
        get.setRequestHeader("Authorization", base64_auth_string);
        get.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET, "UTF-8");  
        
       对于PostMethod设置方式与GetMethod方式一样。

 

相关文章:

  • 2021-10-17
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
  • 2022-02-08
  • 2021-04-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-06-13
  • 2022-12-23
  • 2021-11-16
相关资源
相似解决方案