Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Pass Class Object to MultiPart Entity in android  RSS feed

 
hemanth uppada
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to work on an application where i need to send the class object as Parameter using Multipart Entity along with a file. I have checked that the Multipart addpart method doesn't accept an Object to post to Web Api.Below is the Code i have tried. Any Suggestions on how to pass the object would be great.



The Web Api is developed in Dotnet which is why the windows mobile app has sent the parameters as


 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

What is "the class object"?

Note that MultipartEntity is deprecated, you should use MultipartEntityBuilder instead. But regardless, the 2nd parameter to addPart is a ContentBody, so the ServiceJobFileModel class needs to implement that interface.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!