Questions tagged [apache-commons-httpclient]

The HttpClient v3.x (or older) library from the Apache Commons project

For questions releated to the newer Apache HttpClient v4.x library, see

536 questions
0
votes
1 answer

How to use Apache FileUppload and HttpClient?

I am writing some code to send a log file via http to a server if a JAWS app fails. To test this I have setup a servlet that receives and processes the request. My Client code is as from the Apache HttpClient 4.2 examples { HttpClient…
0
votes
2 answers

How to use Apache HTTPClient's post method to send a List to the server

I wish to append a List in a HTTP Post request. While making use of Apache HTTPClient, I am unable to do the same. This is what I wish to do: List nameValuePairs = new ArrayList(1); nameValuePairs.add(new…
1985percy
  • 433
  • 1
  • 5
  • 8
0
votes
1 answer

Apache Httpclient posts data before destination is OK

Sometimes httpclient is trying http post to server before server accepts it. I don't know which situation it occurs but becuase of this problem posting is failed. Why does client acting like this? Here is some part of the logs; DEBUG…
Ahmet DAL
  • 4,445
  • 9
  • 47
  • 71
0
votes
1 answer

Create an HttpClient with path

I would like an HttpClient instance with a path built-in. So all HttpUriRequest's provided will have their URI appended not only to the host and port, but also the path. For example, with an HttpClient configured for http://tempuri.org/path, an…
David V
  • 11,531
  • 5
  • 42
  • 66
0
votes
2 answers

NULL Pointer Exception HTTP Connect

While executing the below code I am getting a NullPointerException in the class LoginAuthenticate in try block while closing the stream. I am using an AsyncTask and am activating it from the onClick on the Button. On the onClick I am calling the…
Kumar Vishal
  • 121
  • 1
  • 9
0
votes
3 answers

httpclient post xml content in java

I am trying to use httpclient to post xml request as following: String parm1 = MyXml.toString(); PostMethod post = new Postmethod(url); post.setRequestEntity(new StringRequestEntity(parm1)); ... I have an object in the program which I want to…
Tony
  • 3,319
  • 12
  • 56
  • 71
0
votes
2 answers

Why can't Apache HttpClient 4.2 retrieve this page?

I'm trying to retrieve this page using Apache HttpClient: http://quick-dish.tablespoon.com/ Unfortunately, when I try to do this, it just returns the following (as returned by JSoup, so probably it's really just returning the HTTP... string…
sanity
  • 35,347
  • 40
  • 135
  • 226
0
votes
1 answer

HTTP post with image and data

I am using apache HTTP Client for callin rest endpoints. I want to call a POST request with image and some more form data as parameters. I can do them separately with to requests like first for the form data and the other for the image alone. Is…
rozar
  • 1,058
  • 3
  • 15
  • 28
0
votes
1 answer

apache httpclient and spawning a browser that will share the session using java

I have a need to be able to share a session between an apache httpclient and a web browser. My SWT program authenticates the user via httpclient, when the user first uses the program. Later there is a need to launch a default web browser, using the…
0
votes
1 answer

Using the new httpclient-4.0.1 jar with a project using commons-httpclient

Could I safely include the httpclient-4.0.1 jar that replaced the commons-httpclient jar that is now end of life or should I worry about having some conflict between both? Some of my code is using commons-httpclient, should I be worried that having…
dukable
  • 3,968
  • 11
  • 31
  • 42
0
votes
3 answers

Avoiding HTTP Error 301 when using HttpClient 4.x

This question relates to Migrate from Commons HttpClient to HttpComponents Client (migrating from HttpClient 3 to HttpClient 4). I can access a link physically in a browser but when I try to access same link using HttpClient 4.1.13 I get HTTP error…
0
votes
1 answer

need to make httpstatus in opensource httpclient throw an exception

I have a a misbehaving calling application which I dont have the source for, which confronted with a non 200 http status- quietly logs an error/information message... I need to be able to make it actually exit with some kind of error message. …
treefrog
  • 1,027
  • 1
  • 15
  • 30
0
votes
0 answers

Java HttpServer Basic Authentication problems

I have an implementation of Java's HttpServer that I use for testing its pretty basic and means I can adjust what is served up to the client on the fly. My code is using apache http client. I would like to test some authentication using this…
Alex Edwards
  • 1,613
  • 3
  • 24
  • 48
0
votes
1 answer

Test function (ParseToXML,PostMethod) with Junit

I want to write JUNIT tests for this function public static int creerFichierXml(TextField titre_projet,TextField description1,TextField svn,TextField planning1,TextField planning2,TextField goals,TextField mail){ //Créer le fichier XML et l'envoyer…
Jhon
  • 87
  • 4
  • 13
-1
votes
2 answers

Connection reset while streaming xml

My code needs to download a big xml file (500MB) inside a GZIPInputStream and process it doing some operations for every object. Those operations take time to be completed, and I have many objects to process. I'm using commons http-client 3.1 and…
javanna
  • 59,145
  • 14
  • 144
  • 125
1 2 3
35
36