Image Image Image Image Image Image Image Image Image Image

Mudassir Shahzad | July 21, 2017

Scroll to top

Top

No Comments

How To Send HTTP Request GET/POST In Java Using Apache Client

How To Send HTTP Request GET/POST In Java Using Apache Client
Mudassir Shahzad

Apache provides an HttpClient library using which we can send get and post requests to a server. Another method for http requests is provided by the Standard HttpUrlConnection API provided java but in this article we will use the Apache HttpClient library for GET and POST requests.

 

Standard HttpURLConnection is discussed here.

However in this article, we use the Apache HttpClient library for GET and POST requests.

 

Apache HttpClient

HttpClientExample.java

Similarly for POST request, add this method

This is an equivalent example of Standard HttpUrlConnection, but this time, we are using Apache HttpClient to make HTTP GET/POST request.

References

  1. Apache HttpClient

Related posts:

Submit a Comment

Too many requests