Find file History
Permalink
..
Failed to load latest commit information.
src
README.md
pom.xml 增加http group。可保存cookie 多次请求 Dec 16, 2016

README.md

模拟请求模块:(http,ftp)

http

     String html= new SimpleRequestBuilder()
      .http("http://[host]:[port]/")
      .header("key","value")
      .resultAsJsonString() //  ->  header("Accept", "application/json");
      .get()
      .asString();

      //下载文件
      new SimpleRequestBuilder()
       .http("http://[host]:[port]/")
       .download()
       .write(outputstream);

ftp

    new SimpleRequestBuilder()
        .ftp("127.0.0.1",21,"username","password")
        .encode("gbk")
        .ls()
        .forEach(System.out::println);