Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A824810B22 for ; Thu, 10 Oct 2013 09:11:25 +0000 (UTC) Received: (qmail 27508 invoked by uid 500); 10 Oct 2013 09:11:22 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 27482 invoked by uid 500); 10 Oct 2013 09:11:21 -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 27473 invoked by uid 99); 10 Oct 2013 09:11:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 09:11:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of prvs=1995d695bd=mohan.radhakrishnan@polarisft.com designates 202.168.91.51 as permitted sender) Received: from [202.168.91.51] (HELO pols1.polaris.co.in) (202.168.91.51) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 09:11:15 +0000 Received: from smtp01.polarisft.com ([172.16.6.110]) by pols1.polaris.co.in with ESMTP id r9A93NpY029557-r9A93NpZ029557 for ; Thu, 10 Oct 2013 14:33:23 +0530 In-Reply-To: <1381319899.16210.26.camel@ubuntu> References: <1381319899.16210.26.camel@ubuntu> To: "HttpClient User Discussion" MIME-Version: 1.0 Subject: Re: Async API call X-KeepSent: 9311C92F:C74A5A5D-65257C00:00323A26; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.2 August 10, 2010 From: mohan.radhakrishnan@polarisFT.com Message-ID: Date: Thu, 10 Oct 2013 14:40:44 +0530 X-MIMETrack: Serialize by Router on smtp01/SRVR/polarisFT(Release 8.5.2FP4|November 17, 2011) at 10/10/2013 02:30:05 PM, Serialize complete at 10/10/2013 02:30:05 PM Content-Type: multipart/alternative; boundary="=_alternative 0032638565257C00_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 0032638565257C00_= Content-Type: text/plain; charset="US-ASCII" Hi, I plan to capture it through Fiddler to check. This call should route it through the Fiddler proxy. It didn't when I tried. Request[] requests = new Request[] { Request.Post("http://localhost:9090/print"). viaProxy(new HttpHost("127.0.0.1", 8888)). bodyString(getJSon(), ContentType. APPLICATION_JSON), Request.Post("http://localhost:9090/print"). viaProxy(new HttpHost("127.0.0.1", 8888)). bodyString(getJSon(), ContentType. APPLICATION_JSON), }; Thanks, Mohan From: Oleg Kalnichevski To: HttpClient User Discussion Date: 10/09/2013 05:28 PM Subject: Re: Async API call On Wed, 2013-10-09 at 12:23 +0530, mohan.radhakrishnan@polarisFT.com wrote: > Hi, > I am using this JUnit test( example from Apache HTTP Components as > it is ). I am sending JSON to a Netty server which is able to receive 2 > POSTS > and also send responses. I believe Netty can receive more requests but > that might be a different issue. > > Here even for the 2 POSTS that Netty receives and sends responses the > callback methods are not called. I was thinking this unit test will > complete and the JVM will exit. But it doesn't happen. > > When does 'future.get' return ? Does it return as soon as it sends and > receives a response ? > > Since I am a new user I could be making some minor mistakes but the code > is able to send and the server receives the JSON. > > Thanks, > Mohan I ran your code with some minor modifications (I had to eliminate JSON and Netty dependencies) and it worked just fine for me (both responses correctly processed and the JVM terminated as expected). This seems to point at the server side. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit us at http://www.polarisFT.com --=_alternative 0032638565257C00_=--