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 Pronab Bhattacharyya <pr...@tcs.com> on 2008/11/05 16:09:34 UTC
How to retireve parameter's value from a ResponseBody of a post method.
I want to get a particular parameter's value that have in the response
body of the Http post method.
As we know that the getResponseBodyAsStream of PostMethod returns the
whole response body. But I only have to retrieve some parameters values
For example, if we save the ResponseBody into a file we can find out that
it contains
<input type="hidden" name="ProjectID" value="10237">.
My concern is this projectID.
Is there any direct way to get back this parameters value in my java class
?
regrads
Pronab Bhattacharyya
Pronab Bhattacharyya
ASE
Tata Consultancy Services
Victoria Park Building,
Plot No. 37/2, Block GN, Salt Lake,
Kolkata - 700091,West Bengal
India
Cell:- +91-9830367338
Mailto: pronab.bhattacharyya@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: How to retireve parameter's value from a ResponseBody of a
post method.
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2008-11-05 at 20:39 +0530, Pronab Bhattacharyya wrote:
> I want to get a particular parameter's value that have in the response
> body of the Http post method.
> As we know that the getResponseBodyAsStream of PostMethod returns the
> whole response body. But I only have to retrieve some parameters values
> For example, if we save the ResponseBody into a file we can find out that
> it contains
> <input type="hidden" name="ProjectID" value="10237">.
> My concern is this projectID.
> Is there any direct way to get back this parameters value in my java class
> ?
>
No, there is not.
Oleg
> regrads
> Pronab Bhattacharyya
>
>
> Pronab Bhattacharyya
> ASE
> Tata Consultancy Services
> Victoria Park Building,
> Plot No. 37/2, Block GN, Salt Lake,
> Kolkata - 700091,West Bengal
> India
> Cell:- +91-9830367338
> Mailto: pronab.bhattacharyya@tcs.com
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty. IT Services
> Business Solutions
> Outsourcing
> ____________________________________________
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
RE: How to retireve parameter's value from a ResponseBody of a post method.
Posted by Na...@emc.com.
You could possibly set "ProjectID" as a response header and use one of
getResponseHeader* methods of PostMethod to get this value...
Hope this helps...
Regards
Valliappan
-----Original Message-----
From: Pronab Bhattacharyya [mailto:pronab.bhattacharyya@tcs.com]
Sent: Wednesday, November 05, 2008 7:10 AM
To: httpclient-users@hc.apache.org
Subject: How to retireve parameter's value from a ResponseBody of a post
method.
I want to get a particular parameter's value that have in the response
body of the Http post method.
As we know that the getResponseBodyAsStream of PostMethod returns the
whole response body. But I only have to retrieve some parameters values
For example, if we save the ResponseBody into a file we can find out
that
it contains
<input type="hidden" name="ProjectID" value="10237">.
My concern is this projectID.
Is there any direct way to get back this parameters value in my java
class
?
regrads
Pronab Bhattacharyya
Pronab Bhattacharyya
ASE
Tata Consultancy Services
Victoria Park Building,
Plot No. 37/2, Block GN, Salt Lake,
Kolkata - 700091,West Bengal
India
Cell:- +91-9830367338
Mailto: pronab.bhattacharyya@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org