Top "Urlconnection" questions

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

URLConnection with Cookies?

I'm trying to make a URLConnection that supports cookies. According to the documentation I can use: CookieManager cookieManager = new CookieManager(); …

java android cookies urlconnection
URLConnection is not allowing me to access data on Http errors (404,500,etc)

I am making a crawler, and need to get the data from the stream regardless if it is a 200 or …

java urlconnection
URLConnection or HTTPClient : Which offers better functionality and more efficiency?

I looking to create a login form for an android application. I want to use a post method to send …

android httpclient urlconnection
understanding URLConnection.setReadTimeout()

Consider the following snippet: URLConnection connection = target.openConnection(); connection.setConnectTimeout(5000); // 5 sec connection.setReadTimeout(10000); // 10 sec Does the connection.setReadTimeout sets the …

java timeout urlconnection
Reading a web page in Java IOException Premature EOF

I am frequently getting a 'Premature EOF' Exception when reading a web page. The following is the StackTrace java.io.…

java io eof urlconnection
How to send a cookie in a URLConnection?

What is the proper way to send a 'full' cookie across a URLConnection? I've been using: URL url = new URL(…

java cookies urlconnection
Can I globally set the timeout of HTTP connections?

I have a program that uses javax.xml.ws.Service to call a remote service defined by a WSDL. This …

java google-app-engine wsdl httpurlconnection urlconnection
java.lang.ClassCastException: libcore.net.http.HttpURLConnectionImpl cannot be cast to javax.net.ssl.HttpsURLConnection

I'm writing a bit of code to upload a file from the device to the cloud over HTTPS. Relevant snippet: …

java android http https urlconnection
java.net.ConnectException: Connection timed out while connecting through a proxy

I am trying to download a zip file from a URL and store it in the local system using java …

java url proxy download urlconnection
URLConnection setRequestProperty vs addRequestProperty

Lets say I'm talking HTTP to a web server, and I will Accept html or text, but prefer html. In …

java http http-headers urlconnection