Linked Questions
93 questions linked to/from How to add parameters to HttpURLConnection using POST using NameValuePair
2 votes
1 answer
36k views
How to send Post Data to https server via HttpsURLConnection [duplicate]
I saw a form (https://aptransport.in/CFSTONLINE/Reports/VehicleRegistrationSearch.aspx) in web, if i give Select Search Element: as Registration No and Enter Search Element: as AP31BF2942 ,and if i ...
2143 votes
12 answers
1.2m views
How to use java.net.URLConnection to fire and handle HTTP requests
Use of java.net.URLConnection is asked about pretty often here, and the Oracle tutorial is too concise about it. That tutorial basically only shows how to fire a GET request and read the response. It ...
351 votes
20 answers
1.1m views
Java - sending HTTP parameters via POST method easily
I am successfully using this code to send HTTP requests with some parameters via GET method: void sendRequest(String request) { // i.e.: request = "http://example.com/index.php?param1=a&...
316 votes
17 answers
561k views
Sending POST data in Android
I'm experienced with PHP, JavaScript and a lot of other scripting languages, but I don't have a lot of experience with Java or Android. I'm looking for a way to send POST data to a PHP script and ...
261 votes
10 answers
508k views
A KeyValuePair in Java [duplicate]
I'm looking for a KeyValuePair class in Java. Since java.util heavily uses interfaces there is no concrete implementation provided, only the Map.Entry interface. Is there some canonical ...
71 votes
7 answers
202k views
Http Get using Android HttpURLConnection
I'm new to Java and Android development and try to create a simple app which should contact a web server and add some data to a database using a http get. When I do the call using the web browser in ...
19 votes
4 answers
64k views
The import org.apache.http.client cannot be resolved error when I update sdk to M
I am getting following errors when I import project into eclipse. I have updated my sdk to M. import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http....
33 votes
7 answers
55k views
NameValuePair deprecated for openConnection
I been following online tutorials on how to insert data into a database from an android app and have everything working except this small part List<NameValuePair> params = new ArrayList<>(...
22 votes
3 answers
18k views
Deprecated HTTP Classes Android lollipop 5.1
The org.apache.http classes and the AndroidHttpClient class have been deprecated in Android 5.1. These classes are no longer being maintained and you should migrate any app code using these APIs to ...
6 votes
3 answers
15k views
How to switch from HttpClient to HttpUrlConnection?
I am creating an Android application and I send data from Android application to servlet through HttpClient. I use HttpPost method. I read in Android developer site that Apache HttpClient library has ...
12 votes
2 answers
4k views
In Android, why are all org.apache.http.* classes deprecated in API 22 (and what should I use as replacements)?
I use ThreadSafeClientConnManager in my app, and a bunch of other classes like HttpStatus, SSLSocketFactory, PlainSocketFactory, SchemeRegistry, etc. But as of API 22 thery're all being marked as ...
2 votes
5 answers
4k views
Http methods deprecated warning in android studio
I am trying to make some http request with parameters. Currently I am using private List<NameValuePair> mParams = new ArrayList<NameValuePair>(); private DefaultHttpClient mHttpClient; ...
1 vote
2 answers
25k views
Example of POST request in Android studio
I just started learning android few days ago and I have a problem with uploading my JSON data to server. I manage to retrieve it via following code: Edit: I did manage to retrieve files using ...
1 vote
3 answers
39k views
Android | Send “POST” JSON Data to Server
I used this code to send post data to server using android. Could anyone give me any idea or your sample how to send POST OR GET json data to server TOMCAT..! Steps tips : create HttpClient make POST ...
3 votes
1 answer
5k views
ANDROID java.net.URLConnection send image and data at once
i use java.net.URLConnection to send image and some parameters to server using POST method. My code below is works fine to send image to server, but i'm bit confused to attach some parameter and send ...