2018年8月16日 | Leave a comment 问题: http client fluent demo 解决: final String url = "http://****"; final org.apache.http.client.fluent.Response c = org.apache.http.client.fluent.Request.Get(url) .addHeader("Authorization", "auth").execute(); final HttpResponse httpResp = c.returnResponse(); System.out.println(httpResp.getStatusLine()); final String str = IOUtils.toString(httpResp.getEntity().getContent(), "utf-8"); System.out.println(str); 1234567 final String url = "http://****";final org.apache.http.client.fluent.Response c = org.apache.http.client.fluent.Request.Get(url) .addHeader("Authorization", "auth").execute(); final HttpResponse httpResp = c.returnResponse(); System.out.println(httpResp.getStatusLine()); final String str = IOUtils.toString(httpResp.getEntity().getContent(), "utf-8"); System.out.println(str); 参考: