Thanks Justin,

so is it correct that I need to set the HttpPost entity?

            HttpPost postRequest = new HttpPost(posturl);
            InputStream postEntityInStream;
            HttpEntity postEntity = postRequest.getEntity();
            postEntityInStream = postEntity.getContent();
            postEntityInStream.what goes here;<---do I put my data here? if
so how?
            postEntity.setContent(postEntityInStream);
            postRequest.setEntity(postEntity);

I'm definitely missing  something here.  Seems like a catch 22 to me.
Can't setEntity w/o setContent w/o magically putting my data in the
InputStream which comes from the postEntity which comes from the
postRequest... I can't see how to put my sting variables in anywhere.

Thanks again.

On Aug 27, 4:15 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]>
wrote:
> "params" aren't what you think they are, take a look 
> athttp://code.google.com/android/reference/org/apache/http/params/HttpP...
> .
>
> You're looking 
> forhttp://code.google.com/android/reference/org/apache/http/HttpEntity.html
> .
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Aug 27, 10:03 am, Zack <[EMAIL PROTECTED]> wrote:
>
> > Thanks for helping.
>
> > in m5 :
> >                 client = new HttpClient();
> >                 pmethod = new PostMethod(posturl);
> >                 pmethod.addParameter("PacketNum", mStringPacketNumber);
> >                 ...other parameters set here...
> >                 int statusCode = client.executeMethod( pmethod );
>
> > in 0.9:
> >                  HttpClient HClient = new DefaultHttpClient();
> >                  HttpParams HParams = new BasicHttpParams();
> >                  HClient.getConnectionManager();
>
> >                  HttpPost postRequest = new HttpPost(posturl);
> >                  HParams.setParameter("PacketNum",
> > mStringPacketNumber);
> >                  ... other parameters set here...
> >                  postRequest.setParams(HParams);
> >                  HClient.execute(postRequest);
>
> > The Post request is received by the web server in both cases but in
> > the 0.9 version none of the parameters are received.  What is the
> > right way to set the parameters for 0.9 SDK.
>
> > Thanks again.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to