RE: Grabbing a header from the server's response

2003-08-20 Thread Mark Castillo
Ah, thank you all. I was looking all over the javadocs, but couldn't find which classes to use. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 5:48 PM To: 'Commons HttpClient Project' Subject: RE: Grabbing a header fr

RE: Grabbing a header from the server's response

2003-08-19 Thread ross_r
I do it like this, for example, to get the new URL from the location header: Header header = httpget.getResponseHeader("Location"); String newuri = header.getValue(); Ross - get lined up at http://www.careerfish.com -Original Message- From: Mark Castillo [mailto:[EMA

Re: Grabbing a header from the server's response

2003-08-19 Thread Adrian Sutton
On 20/08/2003 9:34 AM, "Mark Castillo" <[EMAIL PROTECTED]> wrote: > After sending a GET request to a server, how to I pick out the name/value of > a specific header from the server's response? > > Thank you. Take a look at the getResponseHeader and associated methods in the GetMethod object (ac

Re: Grabbing a header from the server's response

2003-08-19 Thread Laura Werner
Mark Castillo wrote: After sending a GET request to a server, how to I pick out the name/value of a specific header from the server's response? Call the getResponseHeader(String name) method (or one of its siblings) on the HttpMethod you used for the request, which is probably a GetMethod in