Hi, Otsuka, Try this:
HTTPMethod method = new PostMethod( "http://www.example.com/path/to/something" ); method.getParams().setVirtualHost( "another.example.com" ); yours, Julius On Thu, 2006-02-03 at 01:54 +0900, otsuka wrote: > Hi, > > I want HttpClient to send "Host" request header value > which is different with the host connected. This > behaviour is necessary for authentication purpose. > > Is it possible to overwrites Host header? > If yes, could you tell me how? > > (my desired behaviour log) > DEBUG org.apache.commons.httpclient.HttpConnection - Open connection > to www.example.com:80 > DEBUG httpclient.wire.header - >> "POST /path/to/something HTTP/1.1[\r][\n]" > DEBUG httpclient.wire.header - >> "Host: another.example.com[\r][\n]" > > > Regards, > Otsuka > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Julius Davies Senior Application Developer, Technology Services Credit Union Central of British Columbia http://www.cucbc.com/ Tel: 604-730-6385 Cel: 604-868-7571 Fax: 604-737-5910 1441 Creekside Drive Vancouver, BC Canada V6J 4S7 http://juliusdavies.ca/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
