Re: Using HttpClient to mimic a POST network request

2009-09-24 Thread Yan Cheng Cheok
I realize the reason why it doesn't work is because, HttpClient perform URL encoding explicitly on my payload. If I try to try { Socket socket = new Socket(www.xxx.com, 2); PrintWriter out = new PrintWriter(socket.getOutputStream(), true); final String body =

Is HttpClient suitable for the following task?

2009-09-24 Thread Yan Cheng Cheok
I try to talk to a server, by telneting to it, and send the following command through telnet terminal : POST /%5bvUpJYKw4QvGRMBmhATUxRwv4JrU9aDnwNEuangVyy6OuHxi2YiY=%5dImage? HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: 164

BasicAuthentication using HttpClient 4.0

2009-09-24 Thread kash_meu
Hi, I am trying to send a GET request to http://abcdef.4y3...@hostname.com/abc.php I am not sure how to send request to this url. I am trying like this. HttpGet httpGet = new HttpGet(http://abcdef.4y3...@hostname.com/abc.php;); But this does not seem to be working. Any ideas? Regards, Kashif

Re: Parallel Webcrawler Implementation

2009-09-24 Thread Ken Krugler
Hi Tobi, First, I'd suggest getting and reading through the sources of existing Java-based web crawlers. They all use HttpClient, and thus would provide much useful example code: Nutch (Apache) Droids (Apache) Heritrix (Archive) Bixo (http://bixo.101tec.com) Some comments below: On Sep

Re: Parallel Webcrawler Implementation

2009-09-24 Thread sebb
On 24/09/2009, Ken Krugler kkrugler_li...@transpac.com wrote: Hi Tobi, First, I'd suggest getting and reading through the sources of existing Java-based web crawlers. They all use HttpClient, and thus would provide much useful example code: Nutch (Apache) Droids (Apache) Heritrix

Re: Using HttpClient to mimic a POST network request

2009-09-24 Thread Oleg Kalnichevski
Yan Cheng Cheok wrote: I realize the reason why it doesn't work is because, HttpClient perform URL encoding explicitly on my payload. If I try to try { Socket socket = new Socket(www.xxx.com, 2); PrintWriter out = new PrintWriter(socket.getOutputStream(), true); final String

Re: Is HttpClient suitable for the following task?

2009-09-24 Thread Oleg Kalnichevski
Yan Cheng Cheok wrote: I try to talk to a server, by telneting to it, and send the following command through telnet terminal : POST /%5bvUpJYKw4QvGRMBmhATUxRwv4JrU9aDnwNEuangVyy6OuHxi2YiY=%5dImage? HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: 164

Re: Parallel Webcrawler Implementation

2009-09-24 Thread Oleg Kalnichevski
sebb wrote: On 24/09/2009, Ken Krugler kkrugler_li...@transpac.com wrote: Hi Tobi, First, I'd suggest getting and reading through the sources of existing Java-based web crawlers. They all use HttpClient, and thus would provide much useful example code: Nutch (Apache) Droids (Apache)

Re: BasicAuthentication using HttpClient 4.0

2009-09-24 Thread kash_meu
Tobias N. Sasse wrote: You should provide an error message.. Thanks. I am not getting any error messages. But the output is not right. When I paste http://abcdef.4y3...@hostname.com/abc.php in the browser, I get the right output. But on running the client, the output is not what I am