Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 43862 invoked from network); 28 Feb 2008 09:05:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2008 09:05:19 -0000 Received: (qmail 24576 invoked by uid 500); 28 Feb 2008 09:05:13 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 24562 invoked by uid 500); 28 Feb 2008 09:05:13 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 24553 invoked by uid 99); 28 Feb 2008 09:05:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 01:05:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [60.248.144.94] (HELO mail.cyberpowersystems.com.tw) (60.248.144.94) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 28 Feb 2008 09:04:27 +0000 Received: from 192.168.20.39 by mail.cyberpowersystems.com.tw with Mail2000 ESMTP Server V4.50S(16428:1:AUTH_LOGIN) (envelope-from ); Thu, 28 Feb 2008 17:03:37 +0800 (CST) From: "micky" To: "'HttpClient User Discussion'" References: <11567676.4218291204093616422.JavaMail.servlet@kundenserver> In-Reply-To: <11567676.4218291204093616422.JavaMail.servlet@kundenserver> Subject: RE: [help] how to set an OutputStream to a POST request? Date: Thu, 28 Feb 2008 17:03:28 +0800 Message-ID: <000201c879e8$c8bcd050$5a3670f0$@com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ach5Fws/7qTwv17tSdqHaW0vMNDV/gAz1ccw Content-Language: zh-tw X-Virus-Checked: Checked by ClamAV on apache.org Hi, =20 >>_But I still can't find there is a method or any way to replace >>_HttpURLConnection.getOutputStream() function. > You don't get an output stream, you specify > and HttpEntity to be sent. If you have a String, > use the StringEntity. I retry the examples, and I finally can set a string with a name into = NameValuePair[], then put it into HttpEntity (by HttpPost.setEntity().) The server can use request.getParameter() with a name to get the string. Then I continue trying different HttpEntity. Otherwise, when I use StringEntity or ByteArrayEntity to wrap the string = and put it into HttpEntity (by HttpPost.setEntity()), the server can't = get the string use request.getReader() nor request.getInputStream(). But I can see the "postData" of request object (HttpServletRequest) in = the debug and watch mode in server-side. I don't know how to retrieve the string from that postData attribute of = HttpServletRequest!? Is there any magic thing made I confused? Thanks for any reply or suggestion. Sincerely, Micky --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org