Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 77390 invoked from network); 26 Feb 2004 09:46:50 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Feb 2004 09:46:50 -0000 Received: (qmail 13234 invoked by uid 500); 26 Feb 2004 09:46:23 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 13213 invoked by uid 500); 26 Feb 2004 09:46:23 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 13191 invoked from network); 26 Feb 2004 09:46:22 -0000 Received: from unknown (HELO nose.ch) (195.134.131.71) by daedalus.apache.org with SMTP; 26 Feb 2004 09:46:22 -0000 Received: (qmail 18961 invoked from network); 26 Feb 2004 09:46:35 -0000 Received: from calvin.nose.ch (HELO nose.ch) (192.168.1.7) by nose.ch with SMTP; 26 Feb 2004 09:46:35 -0000 Message-ID: <403DC07A.2020502@nose.ch> Date: Thu, 26 Feb 2004 10:46:34 +0100 From: =?ISO-8859-1?Q?Ortwin_Gl=FCck?= Organization: NOSE Applied Intelligence User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de-ch, en-us MIME-Version: 1.0 To: Commons HttpClient Project Subject: [RFE] provide request entities in a more abstract way Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Providing only an InputStream as a request body is not enough. We can not automatically repeat such a request since we are unable to reset the input stream without buffering it. I suggest we introduce an abstraction for the source of request entities such as: interface RequestEntity { /** * Provides an input stream of the request entity. The method may be called * more than once and must provide a virgin stream upon each call. */ InputStream getAsStream(); } We can then provide convenience classes that implement this interface, such as: * class StringRequestEntity implements RequestEntity * class FileRequestEntity implements RequestEntity etc. What does everybody think about this? Odi -- _________________________________________________________________ NOSE applied intelligence ag ortwin gl�ck [www] http://www.nose.ch software engineer [email] ortwin.glueck@nose.ch hardturmstrasse 171 [pgp id] 0x81CF3416 8005 z�rich [office] +41-1-277 57 35 switzerland [fax] +41-1-277 57 12 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org