You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Bashiro <ba...@myway.com> on 2008/02/05 20:28:28 UTC

GET PROBLEMS!

Hello folks,

I first connect to a site and then make a GET request.

after authentication the site has a GET request code as;

/nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4 HTTP/1.0

when I put
GetMethod get = new GetMethod("/nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4");

I get the following erros;
host parameter is null;


where am I going wrong ? or why is httpclient not able to handle this ?

Thanks for any help

bashiro

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way  your home on the Web - http://www.myway.com



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: GET PROBLEMS!

Posted by Joshua Preston <jo...@tfcci.com>.
Bashiro,

Please see: http://hc.apache.org/httpclient-3.x/methods/get.html

Basically, you aren't using a valid URI, see
http://en.wikipedia.org/wiki/Uniform_Resource_Identifier, as you're
missing the protocol and hostname...

>>From the Javadocs,

GetMethod(String uri) 
          Constructor specifying a URI.

Format it like,

GetMethod get = new
GetMethod("http://myhost.mydomain.local/nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4");

Thanks!

On Tue, 2008-02-05 at 14:28 -0500, Bashiro wrote:

> Hello folks,
> 
> I first connect to a site and then make a GET request.
> 
> after authentication the site has a GET request code as;
> 
> /nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4 HTTP/1.0
> 
> when I put
> GetMethod get = new GetMethod("/nic/update?hostname=mytest.testdomain.com&myip=1.2.3.4");
> 
> I get the following erros;
> host parameter is null;
> 
> 
> where am I going wrong ? or why is httpclient not able to handle this ?
> 
> Thanks for any help
> 
> bashiro
> 
> _______________________________________________
> No banners. No pop-ups. No kidding.
> Make My Way  your home on the Web - http://www.myway.com
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>