Return-Path: Delivered-To: apmail-jakarta-httpcomponents-dev-archive@www.apache.org Received: (qmail 74342 invoked from network); 3 Aug 2007 13:48:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 13:48:11 -0000 Received: (qmail 28563 invoked by uid 500); 3 Aug 2007 13:48:10 -0000 Delivered-To: apmail-jakarta-httpcomponents-dev-archive@jakarta.apache.org Received: (qmail 28538 invoked by uid 500); 3 Aug 2007 13:48:10 -0000 Mailing-List: contact httpcomponents-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list httpcomponents-dev@jakarta.apache.org Received: (qmail 28529 invoked by uid 99); 3 Aug 2007 13:48:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 06:48:10 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.46.255.22] (HELO viefep28-int.chello.at) (213.46.255.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 13:48:06 +0000 Received: from [192.168.0.63] (really [212.71.105.68]) by viefep28-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20070803134743.VFLZ17461.viefep28-int.chello.at@[192.168.0.63]> for ; Fri, 3 Aug 2007 15:47:43 +0200 Subject: Re: How to get parmeters from http request From: Oleg Kalnichevski To: HttpComponents Project In-Reply-To: <22D3B851859E2F4BAE7F4F086123C4E203CE3D58@NA-PA-VBE02.na.tibco.com> References: <22D3B851859E2F4BAE7F4F086123C4E203CE3D58@NA-PA-VBE02.na.tibco.com> Content-Type: text/plain Date: Fri, 03 Aug 2007 15:47:42 +0200 Message-Id: <1186148862.5511.44.camel@okhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Fri, 2007-08-03 at 06:19 -0700, Sachin Mehrotra wrote: > Hi, > > I am not able to figure out how I will get the httprequest parameters on > the Http server side using http-core API. Hi Sachin, The philosophy of HttpCore is that it provides, well, only core functionality: a transport to deliver HTTP messages from one endpoint to another. Everything that has to do with application specific content should be provided externally. > Do I have to retrieve them > from the input stream which I get from the Entity object by writing my > own logic or is there some API there in HTTP-Core? > > Yes, you do. HttpClient has an HttpEntity implementation intended to generate URL encoded form content [1]. What you have to do is to implement an HttpEntity wrapper that performs the reverse operation: reads the content from the InputStream, parses it into an array of name / value pairs, and finally URL decodes the values. Since requests about HTTP parameter parsing started to come up with a depressing regularity, I'll try to find time to implement UrlDecodedFormEntity but cannot commit myself to any time line for that. Hope this helps in some way. Cheers Oleg [1] http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/methods/UrlEncodedFormEntity.java > > Thanks, > > Sachin > > > --------------------------------------------------------------------- To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org