2

there are documentations on how to send a multipart message but no information I can find relates to how to receive a multipart message.

I have a restful service that returns multiple files in a multipart message. I wonder what is the best way to use OKHttp to handle the response. Ideally, I can use MOSHI only.

Many thanks, Jason

JRun9
  • 31
  • 5

1 Answers1

0

Take a look at MultipartBody.Builder and the multipart recipe.

Jesse Wilson
  • 39,078
  • 8
  • 121
  • 128
  • Jesse, thanks but thats the 'documentation on how to send a multipart message' I mentioned in the question. The MultipartBody code clearly only does the building of the message not the parsing. Thanks – JRun9 Apr 27 '17 at 06:58
  • My bad. No multipart decoder in OkHttp yet. Someday. There’s probably an open source project that’ll do it but you’ll need to depend on 2 new logging libraries. – Jesse Wilson Apr 28 '17 at 11:38