Skip to content

pqpo/HttpClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpClient

###一个基于HttpURLConnection的轻量级HttpClient,请求实体均继承于RequestEntity,可拓展性强。 public class Test {

public static void main(String[] args) throws HttpException, IOException {
	HttpClient httpClient = new HttpClient();
	HttpRequest httpRequest = new	HttpRequest(HttpMethod.POST,"http://localhost:8080/HttpClientTest/NewFile.jsp");
	FormRequestEntity body = new FormRequestEntity();
	body.addParam("name", "admin");
	body.addParam("pass", "121212");
	httpRequest.setRequestEntity(body);
	HttpResponse response = httpClient.excute(httpRequest);
	System.out.println(response.body());
}

}

About

轻量级HttpClient

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages