Questions tagged [httpconnection]

The generic concept of a HTTP connection. May also refer to a concrete HTTPConnection in a specific library, especially the Android HttpConnection

The generic concept of a HTTP connection. May also refer to a concrete HTTPConnection in a specific library, especially the Android HttpConnection.

538 questions
0
votes
1 answer

setting params and multipart entity in HttpClient

I using HttpClient and httpost to upload my image file along with some parameters. My code looks like HttpClient httpclient = new DefaultHttpClient(); HttpPost httpost = new HttpPost("xyz.com"); ArrayList
vignesh
  • 1,573
  • 7
  • 33
  • 60
0
votes
1 answer

additional http header not working

I'm trying to add headers into http and below in my code - URL url = new URL("http://localhost:8080/share/page"); HttpURLConnection conn = (HttpURLConnection)…
0
votes
1 answer

Httpconnection in blackberry

I am calling a web service from blackberry when I try to open a connection using Http Connection it throws uncaught exception. "Uncaught Exception: Application is not responding: process terminated" Everything is working fine if I use EVO or WIFI…
0
votes
3 answers

Error in HttpURLConnection - openConnection

I am having the following java function for check the website responce code: URL u = null; try { u = new URL("http://bforball.com"); HttpURLConnection huc = ( HttpURLConnection ) u.openConnection (); huc.setRequestMethod ("GET"); …
ashu
  • 1,339
  • 7
  • 27
  • 43
0
votes
1 answer

java.io.IOException: BufferedInputStream is closed when downloading image file in android java

I got hte following error 05-10 11:14:47.925: W/System.err(9681): java.io.IOException: BufferedInputStream is closed 05-10 11:14:47.925: W/System.err(9681): at java.io.BufferedInputStream.streamClosed(BufferedInputStream.java:118) 05-10…
Adham
  • 63,550
  • 98
  • 229
  • 344
0
votes
2 answers

Cannot instantiate the type HttpConnection

the following is a part of my android java code, I am getting the error "Cannot instantiate the type HttpConnection" import org.apache.http.HttpConnection; import android.app.Activity; import android.app.AlertDialog; public class…
user1709815
  • 265
  • 1
  • 2
  • 9
0
votes
2 answers

How Can I make a HTTP connection and retrieve the mobile version of a website HTML?

Let's say that I need to retrieve the HTML of a website making a Httpget in my app. But, if the site has a mobile version of the content, I want this version and not the usual/desktop version (for instance, if you access http://techcrunch.com/ in…
Renato Lochetti
  • 4,558
  • 3
  • 32
  • 49
0
votes
0 answers

Issue fetch lat and long from the given address in android

I am getting problem of getting latitude and longitude from the google url as shown below and i am using asynctask,no problem of network.i have address array which has 4 adderesses and i am using like below: for(int i = 0; i < address.length; ++i)…
Android Killer
  • 18,174
  • 13
  • 67
  • 90
0
votes
0 answers

getting http url connection error

When I trying to read the data from the server I am getting Error 400: Bad Request Error when reading the data from the server. Although when same code is run for a localhost URL it works fine. Here is my Code: package xmlComm; import…
user251287
  • 101
  • 1
  • 3
  • 12
0
votes
1 answer

Error 403 in HTTPConnection POST in J2ME Nokia S40

I'm developing an apps for S40 using Nokia SDK 2.0 (J2ME) that can connect via REST API to the server. However there's some API (using method POST) result an Error 403 - Forbidden. I've checked the API in the apigee site, with exactly the same…
0
votes
0 answers

Blackberry Local connection timed out after ~ 120000

I have the following code which was working fine: HttpConnection request = (HttpConnection) Connector.open("https://www.google.com"); // It locks at the following line until an exception is thrown int responseCode =…
danielrvt-sgb
  • 1,118
  • 5
  • 17
  • 33
0
votes
1 answer

Measure Java's HttpConnection steps (header & body) for metric analysis?

Scenario I'm doing analytics of a data connection being made via Java's HttpConnection. Specifically, I want to measure: Time it took to receive the response header (not the full response) Time it took to download the data (not the full request,…
AtariPete
  • 1,368
  • 6
  • 19
  • 29
0
votes
2 answers

What is the best way to use a fragment with httpconnection?

I'm doing the refactoring of an application that uses AsyncTask to make HTTP calls to a web service. Now use a simple Activity, at the moment when I needs to invoke the service using a AsyncTask in this way: private class MyAsyncTask extends…
0
votes
1 answer

HTTPConnection timeout not kickin in as expected

I have a Python script that recursively sends data to a central server. The router will go to sleep until there's new data queued up to be transmitted. The wake up process takes about 20 Seconds or so thus I attempted to establish my connection as…
stdcerr
  • 13,725
  • 25
  • 71
  • 128
0
votes
1 answer

HTTP Post method, maximum bytes/data we can submit?

I am trying to use HTTP Post to call a URL, I want know the limit of bytes i can write through post method. Is there a limit for the data you can send through HTTP Post method? I am using HTTPUrlConnection api java for posting data
Avinash Nair
  • 1,984
  • 2
  • 13
  • 17