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
373
votes
7 answers

How do you connect localhost in the Android emulator?

I have made a php script inside localhost and I am connecting that with httpClient but I am getting a problem. Please tell me how can I connect to a php file at localhost from the emulator?
Dharmendra
  • 33,296
  • 22
  • 86
  • 129
315
votes
17 answers

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 display the result.
OMGKurtNilsen
  • 5,048
  • 7
  • 27
  • 36
169
votes
2 answers

ConnectionTimeout versus SocketTimeout

I'm having a problem with a library that I am using. It might be the library or it might be me using it wrong! Basically, when I do this (Timeout in milliseconds) _ignitedHttp.setConnectionTimeout(1); // v…
Robert
  • 37,670
  • 37
  • 171
  • 213
43
votes
4 answers

What is the difference between the setConnectionTimeout , setSoTimeout and "http.connection-manager.timeout" in apache HttpClient API

What is the difference between the three(marked as comments) : MultiThreadedHttpConnectionManager connManag = new MultiThreadedHttpConnectionManager(); HttpConnectionManagerParams managParams =…
Prateek
  • 12,014
  • 12
  • 60
  • 81
43
votes
2 answers

Connection error: "org.jsoup.UnsupportedMimeTypeException: Unhandled content type"

When I try to open a link to parse with jsoup I get an error. Connection command: Document doc = Jsoup.connect("http://www.rfi.ro/podcast/emisiune/174/feed.xml") .timeout(10 * 1000).get(); Errors thrown: Exception in thread "main"…
user2340897
  • 433
  • 1
  • 4
  • 4
38
votes
8 answers

Java: how to use UrlConnection to post request with authorization?

I would like to generate POST request to a server which requires authentication. I tried to use the following method: private synchronized String CreateNewProductPOST (String urlString, String encodedString, String title, String content, Double…
Niko Gamulin
  • 66,025
  • 95
  • 221
  • 286
22
votes
4 answers

How can I programmatically test an HTTP connection?

Using Java, how can I test that a URL is contactable, and returns a valid response? http://stackoverflow.com/about
brasskazoo
  • 76,030
  • 23
  • 64
  • 76
15
votes
4 answers

What are Sockets afterall? Why can't we use sockets instead of HTTP?

Are sockets just a connection between 2 machines? And if sockets can be established why do we even use HTTP connection?
Carbonizer
  • 1,915
  • 2
  • 19
  • 22
15
votes
0 answers

Web Worker effect on max http connections on per browser per domain

This question is an extension to Max HTTP Connections What kind of impact Web worker brings to this equation, would the limit increase? As in 3 web workers would be able to send (3 * browser limit) request?
asolvent
  • 821
  • 13
  • 26
14
votes
1 answer

Spring RestTemplate Connection Timeout is not working

I am trying to configure time out when external web service call. I am calling external web service by Spring Rest Template in my service. For connection timeout testing purpose, the external web service is stopped and application server is down. I…
12
votes
1 answer

ANR caused by Input dispatching timed out - while trying to get my public IP address

I get the following complete error message: Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 2. Wait…
narb
  • 958
  • 1
  • 13
  • 39
12
votes
1 answer

Is it possible to separate WebView's UI and HTTP threads?

For various reasons, I need to runOnUiThread() the actual instantiation & initialization of WebView. Which means that its underlying HTTP connections are also made on the UI thread? If this is true, is it possible to separate the WebView's UI thead…
11
votes
3 answers

Android: Out of Memory error StringBuilder

In my app, I fetching data from the server in the form of JSON. The data is around 1.5 MB. The app works but sometimes it crashes while fetching data from server giving OutOfMemoryError. This is my method: private String sendPostRequest(String…
Nitish
  • 3,097
  • 13
  • 45
  • 80
10
votes
2 answers

Android: Invalid use of SingleClientConnManager: connection still allocated

Possible Duplicate: Exception using HttpRequest.execute(): Invalid use of SingleClientConnManager: connection still allocated I am working in Android. I created HttpSingleton class to create single intance of HttpClient in my complete…
Pushpendra Kuntal
  • 6,118
  • 20
  • 69
  • 119
10
votes
3 answers

What is the relationship between HTTP connection and a request?

While I am configuring my nginx, I found two modules: ngx_http_limit_conn_module and ngx_http_limit_req_module one is for limiting connection per defined key, and one for limiting request. My question is what is the relationship (and difference)…
FingerLiu
  • 113
  • 1
  • 7
1
2 3
35 36