Hey there,

Yah, that I am aware of, you have to include some of the apache commons
classes for the multipart. I did the rest services, so I am in control of
any content-type to send over. Usually it's multipart/form-data, although
I've seen some stream/octet or something like that too.



On Sat, Jan 15, 2011 at 5:06 PM, Mark Murphy <mmur...@commonsware.com>wrote:

> On Sat, Jan 15, 2011 at 7:24 PM, Kevin Duffey <andjar...@gmail.com> wrote:
> > Hello Mark, You know..do you cover this in your book? I don't recall
> seeing
> > an example of this.
>
> No, mostly because the differences are tied up in HttpClient, more so
> than Android proper. I may need to get into this someday, though.
>
> > Anyway, it's a POST method to a Java/Jersey rest resource. I assumed I
> would
> > have to some how set the type to multipart/form-data like a browser does
> for
> > uploading files.
>
> Well, that would be a question for whoever wrote your Java/Jersey REST
> resource. Until you know precisely what the server expects, IMHO it is
> pointless to just toss client code together and hope it works.
>
> Bear in mind that Android's edition of HttpClient does not include
> multipart classes, so you'll have a bit more work to do.
>
> Here are a couple of StackOverflow posts that might help:
>
>
> http://stackoverflow.com/questions/2544517/uploading-images-to-a-php-server-from-android
>
> http://stackoverflow.com/questions/4474367/upload-photo-to-facebook-with-httpclient
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android App Developer Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to