Top "Urlconnection" questions

URLConnection is a class that enables Java code to access data available from various urls.

Apache http client or URLConnection

I need to download a web page on an android app and I am having a hard time deciding whether …

java android urlconnection apache-commons-httpclient
Calling a Servlet from a Java application

I want to call a Servlet from a Java application. The problem is, that the call seems not to reach …

java servlets urlconnection
URLConnection FileNotFoundException for non-standard HTTP port sources

I was trying to use the Apache Ant Get task to get a list of WSDLs generated by another team …

java ant urlconnection
In java, how to create HttpsURLConnection or HttpURLConnection based on the url?

I'm working on a project where I'm creating a class to run http client requests (my class acts as a …

java urlconnection
Reading binary file from URLConnection

I'm trying to read a binary file from a URLConnection. When I test it with a text file it seems …

java http download urlconnection
What is the proper way of setting headers in a URLConnection?

My code is like the following: URLConnection cnx = address.openConnection(); cnx.setAllowUserInteraction(false); cnx.setDoOutput(true); cnx.addRequestProperty("User-Agent", "Mozilla/4.0 (…

java header urlconnection
How to send an HTTP header in java

Is it possible to send a Http header via a URL connection in java? I had this working using sockets, …

java http http-headers urlconnection
Setting custom header using HttpURLConnection

I am simply making a GET request to a Rest API using HttpURLConnection. I need to add some custom headers …

java rest http-headers httpurlconnection urlconnection
HttpURLConnection sends a POST request even though httpCon.setRequestMethod("GET"); is set

Here is my code: String addr = "http://172.26.41.18:8080/domain/list"; URL url = new URL(addr); HttpURLConnection httpCon = (HttpURLConnection) url.openConnection(); httpCon.…

java http urlconnection
Difference between URLConnection, HttpURLConnection and HttpsURLConnection

What is the difference between URLConnection, HttpURLConnection and HttpsURLConnection (with SSL). Under what conditions, which one should I use?

java urlconnection